From dd8e4ffb2b8d349d03ea2f96e6d35e656d4123a5 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Sat, 22 Nov 2008 14:40:27 +0000 Subject: [PATCH] Remove an old piece of code that has been superseded by CGAL code in CGAL-3.3 (CGAL_assertion now triggers exceptions, by default). --- Mesh_2/demo/Mesh_2/mesh_2_demo.cpp | 52 +----------------------------- 1 file changed, 1 insertion(+), 51 deletions(-) diff --git a/Mesh_2/demo/Mesh_2/mesh_2_demo.cpp b/Mesh_2/demo/Mesh_2/mesh_2_demo.cpp index 7649c8766e7..0a8a38ed351 100644 --- a/Mesh_2/demo/Mesh_2/mesh_2_demo.cpp +++ b/Mesh_2/demo/Mesh_2/mesh_2_demo.cpp @@ -1506,39 +1506,6 @@ const QString MyWindow::my_filters = "Shewchuk Triangle .poly files (*.poly);;" "All files (*)"; - -#include -#include -#include - -CGAL::Failure_function my_previous_failure_function; - -class Cgal_exception : public std::exception { -public: - Cgal_exception(const char *t, - const char *e, - const char* f, - int l, - const char* m) - : type(t), expr(e), file(f), line(l), msg(m) {}; - - const char *type; - const char *expr; - const char* file; - int line; - const char* msg; -}; - -void cgal_with_exceptions_failure_handler( - const char *type, - const char *expr, - const char* file, - int line, - const char* msg) -{ - throw Cgal_exception(type,expr,file,line,msg); -} - int main(int argc, char** argv) { QApplication app( argc, argv ); @@ -1553,24 +1520,7 @@ int main(int argc, char** argv) if( argc == 2 ) W->openTriangulation(QString(argv[1])); - // my_previous_failure_function = - //CGAL::set_error_handler(cgal_with_exceptions_failure_handler); - - try { - return app.exec(); - } - catch(Cgal_exception e) { - std::cerr << "catch(Cgal_exception e)" << std::endl; - try { - W->dumpTriangulation(); - } - catch(...) { - std::cerr << "PANIC !!" << std::endl; - } - my_previous_failure_function(e.type, e.expr, e.file, e. line, e.msg); - } - - return 0; + return app.exec(); } // moc_source_file: mesh_2_demo.cpp