Commit 94fdc674 authored by Lorenzo Marcantonio's avatar Lorenzo Marcantonio

Added 'parachute' std::exception handling to python interface

parent 0938f2cf
...@@ -55,6 +55,13 @@ ...@@ -55,6 +55,13 @@
PyErr_SetString(PyExc_IOError,ExceptionError); PyErr_SetString(PyExc_IOError,ExceptionError);
return NULL; return NULL;
} }
catch( std::exception &e )
{
char ExceptionError[256];
sprintf( ExceptionError, "%s\n", e.what() );
PyErr_SetString(PyExc_IOError,ExceptionError);
return NULL;
}
catch( ... ) catch( ... )
{ {
SWIG_fail; SWIG_fail;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment