From f181dace8eb45ba0525b4bc76dc2dd0f782b2c5c Mon Sep 17 00:00:00 2001 From: Aaron Gokaslan Date: Fri, 6 May 2022 14:39:59 -0400 Subject: [PATCH] default ctor is noexcept too --- include/pybind11/pytypes.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/pybind11/pytypes.h b/include/pybind11/pytypes.h index 7f66710c1..cef1e3171 100644 --- a/include/pybind11/pytypes.h +++ b/include/pybind11/pytypes.h @@ -388,7 +388,7 @@ class PYBIND11_EXPORT_EXCEPTION error_already_set : public std::runtime_error { public: /// Constructs a new exception from the current Python error indicator, if any. The current /// Python error indicator will be cleared. - error_already_set() : std::runtime_error("") { + error_already_set() noexcept : std::runtime_error("") { PyErr_Fetch(&m_type.ptr(), &m_value.ptr(), &m_trace.ptr()); if (m_type) { PyErr_NormalizeException(&m_type.ptr(), &m_value.ptr(), &m_trace.ptr());