diff --git a/Polyhedron/demo/Polyhedron/Polyhedron_demo.cpp b/Polyhedron/demo/Polyhedron/Polyhedron_demo.cpp index 45add22401f..aaddc1fcb72 100644 --- a/Polyhedron/demo/Polyhedron/Polyhedron_demo.cpp +++ b/Polyhedron/demo/Polyhedron/Polyhedron_demo.cpp @@ -100,6 +100,7 @@ Polyhedron_demo::~Polyhedron_demo() {} void Polyhedron_demo::do_not_catch_exceptions() { d_ptr->catch_exceptions = false; + setProperty("no-try-catch", true); } bool Polyhedron_demo::notify(QObject* receiver, QEvent* event) diff --git a/Three/include/CGAL/Three/exceptions.h b/Three/include/CGAL/Three/exceptions.h index ad088abaa3c..137df71a3c1 100644 --- a/Three/include/CGAL/Three/exceptions.h +++ b/Three/include/CGAL/Three/exceptions.h @@ -23,6 +23,7 @@ #include #include +#include #include #include #include @@ -81,7 +82,8 @@ wrap_a_call_to_cpp(Callable f, typedef Optional_or_bool O_r_b; typedef typename O_r_b::type Return_type; - if(qs == 0 || !qs->context()) return O_r_b::invoke(f); + const bool no_try_catch = qApp->property("no-try-catch").toBool(); + if(no_try_catch || qs == 0 || !qs->context()) return O_r_b::invoke(f); else try { return O_r_b::invoke(f);