mirror of
https://github.com/pybind/pybind11.git
synced 2026-07-11 01:26:58 +00:00
default ctor is noexcept too
This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user