Commit f1f30a88 authored by Oliver Sander's avatar Oliver Sander

[!184] [!183] Catch polymorphic exceptions by reference

Merge branch 'cherry-pick-cc1312ad' into 'releases/2.6'

ref:staging/dune-functions Merge branch
'catch-polymorphic-exception-by-reference' into 'master'

g++ 8 warns about this.

See merge request [[!183]]

(cherry picked from commit cc1312ad)

23fe5770 Catch polymorphic exceptions by reference

See merge request [!184]

  [!183]: gitlab.dune-project.org/staging/dune-functions/merge_requests/183
  [!184]: gitlab.dune-project.org/staging/dune-functions/merge_requests/184
parents 6bb16101 d105bce2
Pipeline #14087 passed with stage
in 11 minutes and 8 seconds
......@@ -484,7 +484,7 @@ int main (int argc, char *argv[]) try
}
// Error handling
catch (Exception e)
catch (Exception& e)
{
std::cout << e << std::endl;
std::cout << e.what() << std::endl;
}
......@@ -386,6 +386,6 @@ int main (int argc, char *argv[]) try
}
// Error handling
catch (Exception e) {
std::cout << e << std::endl;
catch (Exception& e) {
std::cout << e.what() << std::endl;
}
......@@ -524,6 +524,6 @@ int main (int argc, char *argv[]) try
}
// Error handling
catch (Exception e) {
std::cout << e << std::endl;
catch (Exception& e) {
std::cout << e.what() << std::endl;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment