Commit 82159daf authored by Peter Eastman's avatar Peter Eastman
Browse files

Improved exception handling: catch any exception, not just OpenMMException

parent 385c1475
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
%exception { %exception {
try { try {
$action $action
} catch (OpenMM::OpenMMException &e) { } catch (std::exception &e) {
PyErr_SetString(PyExc_Exception, const_cast<char*>(e.what())); PyErr_SetString(PyExc_Exception, const_cast<char*>(e.what()));
return NULL; return NULL;
} }
......
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