mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-25 14:45:12 +00:00
Do not attempt to normalize if no exception occurred
This is not supported on PyPy-2.7 5.8.0.
This commit is contained in:
parent
87d1f6ba08
commit
e289e0ea24
@ -335,6 +335,7 @@ public:
|
||||
|
||||
virtual const char* what() const noexcept {
|
||||
if (m_lazy_what.empty()) {
|
||||
if (m_type || m_value || m_trace)
|
||||
PyErr_NormalizeException(&m_type.ptr(), &m_value.ptr(), &m_trace.ptr());
|
||||
m_lazy_what = detail::error_string(m_type.ptr(), m_value.ptr(), m_trace.ptr());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user