Skip to content

Commit

Permalink
Merge pull request matplotlib#9299 from anntzer/c++-std-runtime_error
Browse files Browse the repository at this point in the history
FIX: Restore better error message on std::runtime_error.
  • Loading branch information
tacaswell authored Oct 7, 2017
2 parents ad8ef63 + be87212 commit 129403c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/py_exceptions.h
Original file line number Diff line number Diff line change
@@ -46,6 +46,14 @@ class exception : public std::exception
} \
return (errorcode); \
} \
catch (const std::runtime_error &e) \
{ \
PyErr_Format(PyExc_RuntimeError, "In %s: %s", (name), e.what()); \
{ \
cleanup; \
} \
return (errorcode); \
} \
catch (...) \
{ \
PyErr_Format(PyExc_RuntimeError, "Unknown exception in %s", (name)); \

0 comments on commit 129403c

Please sign in to comment.