From e16e773fb870e76d2e090109318758e4911053b1 Mon Sep 17 00:00:00 2001 From: Dmitry Anisimov Date: Mon, 22 Feb 2021 17:37:57 +0100 Subject: [PATCH] fixed exception handling --- .../self_intersections.h | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/self_intersections.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/self_intersections.h index 1de9be33e37..a6581cd65a6 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/self_intersections.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/self_intersections.h @@ -498,12 +498,25 @@ bool does_self_intersect(const FaceRange& face_range, { CGAL_precondition(CGAL::is_triangle_mesh(tmesh)); - try { + try + { CGAL::Emptyset_iterator unused_out; internal::self_intersections_impl(face_range, tmesh, unused_out, true /*throw*/, np); - } catch(const std::exception&) { + } + catch (const CGAL::internal::Throw_at_output_exception&) + { return true; } + #if defined(CGAL_LINKED_WITH_TBB) + catch (tbb::captured_exception& e) + { + return true; + } + #endif + catch ( ... ) + { + throw; + } return false; }