diff --git a/include/pybind11/pytypes.h b/include/pybind11/pytypes.h index 73a47ec88..f8f0fe33c 100644 --- a/include/pybind11/pytypes.h +++ b/include/pybind11/pytypes.h @@ -409,6 +409,7 @@ public: return m_lazy_what.c_str(); } catch (...) { m_lazy_what = "Unknown internal error occurred"; + return m_lazy_what.c_str(); } } return m_lazy_what.c_str();