8000 Restore better error message on std::runtime_error. by anntzer · Pull Request #9299 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Restore better error message on std::runtime_error. #9299

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 7, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Restore better error message on std::runtime_error.
  • Loading branch information
anntzer committed Oct 6, 2017
commit be87212afbbecfbef031aa9653b446342e800f9f
8 changes: 8 additions & 0 deletions src/py_exceptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)); \
Expand Down
0