FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Merge pull request #9299 from anntzer/c++-std-runtime_error · matplotlib/matplotlib@129403c · GitHub

Repository navigation

Commit 129403c

Browse files
authored
Merge pull request #9299 from anntzer/c++-std-runtime_error
FIX: Restore better error message on std::runtime_error.
2 parents ad8ef63 + be87212 commit 129403c

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

‎src/py_exceptions.h‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,14 @@ class exception : public std::exception
4646
} \
4747
return (errorcode); \
4848
} \
49+
catch (const std::runtime_error &e) \
50+
{ \
51+
PyErr_Format(PyExc_RuntimeError, "In %s: %s", (name), e.what()); \
52+
{ \
53+
cleanup; \
54+
} \
55+
return (errorcode); \
56+
} \
4957
catch (...) \
5058
{ \
5159
PyErr_Format(PyExc_RuntimeError, "Unknown exception in %s", (name)); \

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL