Skip to content
Snippets Groups Projects
Commit 009c7743 authored by oliver.sander_at_tu-dresden.de's avatar oliver.sander_at_tu-dresden.de
Browse files

Fix a compiler warning

 "Catching polymorphic type ‘class Dune::Exception’ by value"
parent 7bbb4d31
No related branches found
No related tags found
1 merge request!12Implement addToDiagonal for scalars (interpreted as 1x1 matrices)
...@@ -77,7 +77,7 @@ bool checkResize() { ...@@ -77,7 +77,7 @@ bool checkResize() {
FV fv; FV fv;
resize(fv, Dune::FieldVector<int, 5>()); resize(fv, Dune::FieldVector<int, 5>());
return false; return false;
} catch (Dune::Exception) { } catch (Dune::Exception&) {
// TODO make sure the right exception is thrown // TODO make sure the right exception is thrown
} }
...@@ -116,9 +116,9 @@ bool checkResize() { ...@@ -116,9 +116,9 @@ bool checkResize() {
// test "unnatural" matrix types // test "unnatural" matrix types
// TODO // TODO
} catch (Dune::Exception e) { } catch (Dune::Exception& e) {
std::cout << "FAILURE." << std::endl; std::cout << "FAILURE." << std::endl;
std::cout << e << std::endl; std::cout << e.what() << std::endl;
return false; return false;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment