mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-25 14:45:12 +00:00
This commit is contained in:
parent
3829b7624c
commit
30716c67a1
@ -993,6 +993,7 @@ struct error_scope {
|
||||
PyObject *type, *value, *trace;
|
||||
error_scope() { PyErr_Fetch(&type, &value, &trace); }
|
||||
error_scope(const error_scope &) = delete;
|
||||
error_scope &operator=(const error_scope &) = delete;
|
||||
~error_scope() { PyErr_Restore(type, value, trace); }
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user