8000 Restore better error message on std::runtime_error. · matplotlib/matplotlib@d6661f9 · GitHub
[go: up one dir, main page]

Skip to content

Commit d6661f9

Browse files
committed
Restore better error message on std::runtime_error.
1 parent 89183ba commit d6661f9

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/py_exceptions.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,14 @@ class exception : public std::exception
3838
} \
3939
return (errorcode); \
4040
} \
41+
catch (const std::runtime_error &e) \
42+
{ \
43+
PyErr_Format(PyExc_OverflowError, "In %s: %s", (name), e.what()); \
44+
{ \
45+
cleanup; \
46+
} \
47+
return (errorcode); \
48+
} \
4149
catch (const std::overflow_error &e) \
4250
{ \
4351
PyErr_Format(PyExc_OverflowError, "In %s: %s", (name), e.what()); \

0 commit comments

Comments
 (0)
0