From 377ce5b9a2ebe9f72f65802d1c9b7045e08284d2 Mon Sep 17 00:00:00 2001
From: Oliver Sander <oliver.sander@tu-dresden.de>
Date: Sat, 29 Sep 2018 20:27:16 +0200
Subject: [PATCH] Catch polymorphic exception by value

gcc 8 warns about this.
---
 src/finite-strain-elasticity.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/finite-strain-elasticity.cc b/src/finite-strain-elasticity.cc
index 5eea681..81f6094 100644
--- a/src/finite-strain-elasticity.cc
+++ b/src/finite-strain-elasticity.cc
@@ -359,6 +359,6 @@ int main (int argc, char *argv[]) try
     vtkWriter.write(resultPath + "finite-strain_homotopy_" + std::to_string(i+1));
   }
 
-} catch (Exception e) {
-    std::cout << e << std::endl;
+} catch (Exception& e) {
+    std::cout << e.what() << std::endl;
 }
-- 
GitLab