From dd67f1cce53beba08b2e9b4ee839a65b282b1aed Mon Sep 17 00:00:00 2001
From: Christoph Lehmann <christoph.lehmann@ufz.de>
Date: Wed, 15 Jun 2016 12:43:13 +0200
Subject: [PATCH] [BL] disable check if stack unwinds

---
 BaseLib/ConfigTree.cpp | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/BaseLib/ConfigTree.cpp b/BaseLib/ConfigTree.cpp
index ac32d11f2a1..e74dda59ff5 100644
--- a/BaseLib/ConfigTree.cpp
+++ b/BaseLib/ConfigTree.cpp
@@ -65,7 +65,8 @@ ConfigTree(ConfigTree && other)
 
 ConfigTree::~ConfigTree()
 {
-    checkAndInvalidate();
+    if (!std::uncaught_exception())
+        checkAndInvalidate();
 }
 
 ConfigTree&
@@ -194,6 +195,9 @@ void ConfigTree::ignoreConfigParameterAll(const std::string &param) const
 void ConfigTree::error(const std::string& message) const
 {
     _onerror(_filename, _path, message);
+    OGS_FATAL(
+        "ConfigTree: The error handler does not break out of the normal "
+        "control flow.");
 }
 
 void ConfigTree::warning(const std::string& message) const
-- 
GitLab