From 43e409e7e39ed0230d99f602e55f7845c2a32f67 Mon Sep 17 00:00:00 2001
From: Martin Nolte <mnolte@dune-project.org>
Date: Wed, 30 Sep 2009 15:47:23 +0000
Subject: [PATCH] make CHECK_INTERFACE_IMPLEMENTATION exception safe

[[Imported from SVN: r5606]]
---
 common/bartonnackmanifcheck.hh | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/common/bartonnackmanifcheck.hh b/common/bartonnackmanifcheck.hh
index 7527750ca..e86bdb519 100644
--- a/common/bartonnackmanifcheck.hh
+++ b/common/bartonnackmanifcheck.hh
@@ -24,8 +24,15 @@
     if( call == true ) \
       DUNE_THROW(NotImplemented,"Interface method not implemented!");\
     call = true; \
-    (__interface_method_to_call__); \
-    call = false; \
+    try { \
+      (__interface_method_to_call__); \
+      call = false; \
+    } \
+    catch ( ... ) \
+    { \
+      call = false; \
+      throw; \
+    } \
   }
 #endif
 #endif
-- 
GitLab