Skip to content

Commit

Permalink
Temporary workaround for PYBIND11_CATCH_INIT_EXCEPTIONS issue that ex…
Browse files Browse the repository at this point in the history
…ists already on master (see PR pybind#3965).
  • Loading branch information
Ralf W. Grosse-Kunstleve committed May 21, 2022
1 parent fdab517 commit 6010f5b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion include/pybind11/detail/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,9 @@

#define PYBIND11_CATCH_INIT_EXCEPTIONS \
catch (pybind11::error_already_set &) { \
pybind11::raise_from(PyExc_ImportError, "initialization failed"); \
std::string err_str = py::detail::error_string(); \
PyErr_Clear(); \
PyErr_SetString(PyExc_ImportError, err_str.c_str()); \
return nullptr; \
} \
catch (const std::exception &e) { \
Expand Down

0 comments on commit 6010f5b

Please sign in to comment.