From 1ba8161713478235f788633c99e26ef2fadd6429 Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Thu, 12 Nov 2009 20:28:44 +0000
Subject: [PATCH] throw exception instead of assert() when meshes overlap

---
 contrib/Tetgen/tetgen.cxx | 5 ++++-
 doc/VERSIONS.txt          | 6 +++---
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/contrib/Tetgen/tetgen.cxx b/contrib/Tetgen/tetgen.cxx
index 91035a6404..23a5449f67 100644
--- a/contrib/Tetgen/tetgen.cxx
+++ b/contrib/Tetgen/tetgen.cxx
@@ -22503,7 +22503,9 @@ void tetgenmesh::rearrangesubfaces(list* missingshlist, list* boundedgelist,
         }
       }
     } while (hitbdry < 2 && apex(spintet) != apex(starttet));
+#ifdef SELF_CHECK //GMSH
     assert(matchflag == true);
+#endif //GMSH
     tspivot(spintet, neighsh);
     if (neighsh.sh != dummysh) {
       printf("Error:  Invalid PLC.\n");
@@ -22511,7 +22513,8 @@ void tetgenmesh::rearrangesubfaces(list* missingshlist, list* boundedgelist,
              shellmark(neighsh), shellmark(shloop));
       printf("  It might be caused by a facet is defined more than once.\n");
       printf("  Hint:  Use -d switch to find all overlapping facets.\n");
-      exit(1);
+      terminatetetgen(1);
+      //GMSH exit(1);
     }
     // The side of 'spintet' is at which a new subface will be attached.
     adjustedgering(spintet, CCW);
diff --git a/doc/VERSIONS.txt b/doc/VERSIONS.txt
index 2629efeece..315f901055 100644
--- a/doc/VERSIONS.txt
+++ b/doc/VERSIONS.txt
@@ -1,6 +1,6 @@
-?: new client/server visualization mode; compound geometrical
-entities; new option to force the type of views dynamically; bug
-fixes.
+2.4.3 (?): new client/server visualization mode; new option to force
+the type of views dynamically; small bug fixes and usability
+improvements.
 
 2.4.2 (Sep 21, 2009): solver code refactoring + better IDE
 integration.
-- 
GitLab