From: Stefano Zampini Date: Sat, 24 Jun 2023 23:52:22 +0000 (+0300) Subject: Fix warning X-Git-Tag: v9.5.0-rc1~21^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b097f278ad9e9c4c3b506028d836e32c998c9936;p=dealii.git Fix warning catching polymorphic type ‘class dealii::StandardExceptions::ExcFunctionNotProvided’ by value [-Wcatch-value=] --- diff --git a/tests/petsc/petsc_snes_02.cc b/tests/petsc/petsc_snes_02.cc index d2edd32ac1..1ce565056e 100644 --- a/tests/petsc/petsc_snes_02.cc +++ b/tests/petsc/petsc_snes_02.cc @@ -77,7 +77,7 @@ main(int argc, char **argv) AssertThrow(snes == static_cast(mysolver), ExcInternalError()); mysolver.solve(v, A); } - catch (StandardExceptions::ExcFunctionNotProvided) + catch (StandardExceptions::ExcFunctionNotProvided &) { deallog << "catching expected exception" << std::endl; } diff --git a/tests/petsc/petsc_ts_01.cc b/tests/petsc/petsc_ts_01.cc index 92f7690b2b..43cdf09f7b 100644 --- a/tests/petsc/petsc_ts_01.cc +++ b/tests/petsc/petsc_ts_01.cc @@ -79,7 +79,7 @@ main(int argc, char **argv) AssertThrow(ts == static_cast(myode), ExcInternalError()); myode.solve(v, A); } - catch (StandardExceptions::ExcFunctionNotProvided) + catch (StandardExceptions::ExcFunctionNotProvided &) { deallog << "catching expected exception" << std::endl; }