Improve error message in rare case

This commit is contained in:
Aaron Gokaslan 2022-02-13 13:30:16 -05:00
parent ff3185ea7d
commit 95eeaefd1e

View File

@ -398,6 +398,7 @@ public:
try {
m_lazy_what = detail::error_string(m_type.ptr(), m_value.ptr(), m_trace.ptr());
} catch (...) {
PyErr_SetString(PyExc_RuntimeError, "Unknown internal error occurred");
return "Unknown internal error occurred";
}
}