]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix warning
authorStefano Zampini <stefano.zampini@gmail.com>
Sat, 24 Jun 2023 23:52:22 +0000 (02:52 +0300)
committerStefano Zampini <stefano.zampini@gmail.com>
Sun, 25 Jun 2023 00:00:43 +0000 (03:00 +0300)
catching polymorphic type â€˜class dealii::StandardExceptions::ExcFunctionNotProvided’ by value [-Wcatch-value=]

tests/petsc/petsc_snes_02.cc
tests/petsc/petsc_ts_01.cc

index d2edd32ac139e6d23ee915709a54343d14bac27d..1ce565056e1369fca4255e4ba2ccf3086e6f0094 100644 (file)
@@ -77,7 +77,7 @@ main(int argc, char **argv)
       AssertThrow(snes == static_cast<SNES>(mysolver), ExcInternalError());
       mysolver.solve(v, A);
     }
-  catch (StandardExceptions::ExcFunctionNotProvided)
+  catch (StandardExceptions::ExcFunctionNotProvided &)
     {
       deallog << "catching expected exception" << std::endl;
     }
index 92f7690b2b8e013353869c90127c39f7595b311e..43cdf09f7bb677f255b61b045109872a80136e3a 100644 (file)
@@ -79,7 +79,7 @@ main(int argc, char **argv)
       AssertThrow(ts == static_cast<TS>(myode), ExcInternalError());
       myode.solve(v, A);
     }
-  catch (StandardExceptions::ExcFunctionNotProvided)
+  catch (StandardExceptions::ExcFunctionNotProvided &)
     {
       deallog << "catching expected exception" << std::endl;
     }

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.