Skip to content

Commit

Permalink
Merge pull request #94 from lsst/tickets/DM-30023
Browse files Browse the repository at this point in the history
DM-30023: replace uncaught_exception by uncaught_exceptions
  • Loading branch information
mwittgen committed May 5, 2021
2 parents cb07a25 + 098df24 commit 0bf7090
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/lsst/utils/python.h
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ class LSST_PRIVATE WrapperCollection final {
WrapperCollection & operator=(WrapperCollection &&) = delete;

~WrapperCollection() noexcept {
if (!std::uncaught_exception() && !_definitions.empty()) {
if (std::uncaught_exceptions()==0 && !_definitions.empty()) {
PyErr_SetString(PyExc_ImportError,
"WrapperCollection::finish() not called; module definition incomplete.");
PyErr_WriteUnraisable(module.ptr());
Expand Down

0 comments on commit 0bf7090

Please sign in to comment.