From: Bruno Turcksin Date: Wed, 6 Dec 2017 18:54:56 +0000 (-0500) Subject: Disable abort on exception for the python wrappers. X-Git-Tag: v9.0.0-rc1~678^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F5591%2Fhead;p=dealii.git Disable abort on exception for the python wrappers. --- diff --git a/contrib/python-bindings/source/wrappers.cc b/contrib/python-bindings/source/wrappers.cc index 0be4354a5a..e4535f80fe 100644 --- a/contrib/python-bindings/source/wrappers.cc +++ b/contrib/python-bindings/source/wrappers.cc @@ -14,6 +14,7 @@ // --------------------------------------------------------------------- #include +#include #include @@ -48,6 +49,11 @@ BOOST_PYTHON_MODULE(Debug) doc_options.enable_py_signatures(); doc_options.disable_cpp_signatures(); + // Switch off call to std::abort when an exception is created using Assert. + // If the code aborts, the kernel of a Jupyter Notebook is killed and no + // message is printed. + dealii::deal_II_exceptions::disable_abort_on_exception(); + dealii::python::export_cell_accessor(); dealii::python::export_point(); dealii::python::export_triangulation();