From 6c96165c3cdbdcf099f50a4f956189a64e13ba1d Mon Sep 17 00:00:00 2001
From: Stephane Del Pino <stephane.delpino44@gmail.com>
Date: Fri, 1 Feb 2019 11:16:55 +0100
Subject: [PATCH] Use std::terminate instead of std::exit to help debugging

---
 src/mesh/ItemValue.hpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/mesh/ItemValue.hpp b/src/mesh/ItemValue.hpp
index 60bfd23c3..4b71bb9cc 100644
--- a/src/mesh/ItemValue.hpp
+++ b/src/mesh/ItemValue.hpp
@@ -43,7 +43,7 @@ class ItemValue
 
  public:
   PASTIS_FORCEINLINE
-  const bool& isBuilt() const
+  bool isBuilt() const
   {
     return m_is_built;
   }
@@ -104,13 +104,13 @@ class ItemValue
 
     if (m_values.size() != values.size()) {
       perr() << "Cannot assign an array of values of a different size\n";
-      std::exit(1);
+      std::terminate();
     }
 
     if (values.size() > 0) {
       if (not m_is_built) {
         perr() << "Cannot assign array of values to a non-built ItemValue\n";
-        std::exit(1);
+        std::terminate();
       }
 
       m_values = values;
-- 
GitLab