From 231218dedc8000043a043ef4703db9d12e9f97e0 Mon Sep 17 00:00:00 2001
From: Oliver Sander <oliver.sander@tu-dresden.de>
Date: Mon, 2 Oct 2023 11:02:35 +0200
Subject: [PATCH] Fix warning about catching polymorphic exception by value

---
 dune/microstructure/prestrainedMaterial.hh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dune/microstructure/prestrainedMaterial.hh b/dune/microstructure/prestrainedMaterial.hh
index 83e685b1..16e43bff 100644
--- a/dune/microstructure/prestrainedMaterial.hh
+++ b/dune/microstructure/prestrainedMaterial.hh
@@ -265,7 +265,7 @@ Func2Tensor setupPrestrainPhase(Python::Module module, int phase){
     module.get("phase" + std::to_string(phase) + "_axis").toC<int>(axis);
     module.get("phase" + std::to_string(phase) + "_angle").toC<double>(angle);
   }
-  catch(Dune::Exception)
+  catch(Dune::Exception&)
   {
     //default frame is used.
   }
@@ -329,7 +329,7 @@ Dune::FieldMatrix<double,6,6> setupPhase(Python::Module module, int phase)
     module.get("phase" + std::to_string(phase) + "_axis").toC<int>(axis);
     module.get("phase" + std::to_string(phase) + "_angle").toC<double>(angle);
   }
-  catch(Dune::Exception)
+  catch(Dune::Exception& e)
   {
     // std::cout << "(Could not read frame vectors for material phase) " << phase << ": - Canonical Frame (default) is used." << std::endl;
     std::cout << "(Could not read rotation axis & angle for material phase) " << phase << ": - Canonical Frame (default) is used." << std::endl;
-- 
GitLab