You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What version (or hash if on master) of pybind11 are you using?
2.13.6
Problem description
On MacOS a C++ exception registered with py::register_exception will not be caught as the desired exception when raised from extension modules other than the one it was defined in.
In the following example I would expect a.throw_MyRuntimeError_a and b.throw_MyRuntimeError_b to raise a.MyRuntimeError.
This is the behaviour found on Windows and Linux but on MacOS b.throw_MyRuntimeError_b only raises python's RuntimeError. a.throw_MyRuntimeError_a works as expected.
Here is a pull request with tests on a repository with all the code required to reproduce this. gentlegiantJGC/pybind11-crash#1
Required prerequisites
What version (or hash if on master) of pybind11 are you using?
2.13.6
Problem description
On MacOS a C++ exception registered with
py::register_exception
will not be caught as the desired exception when raised from extension modules other than the one it was defined in.In the following example I would expect
a.throw_MyRuntimeError_a
andb.throw_MyRuntimeError_b
to raisea.MyRuntimeError
.This is the behaviour found on Windows and Linux but on MacOS
b.throw_MyRuntimeError_b
only raises python'sRuntimeError
.a.throw_MyRuntimeError_a
works as expected.Here is a pull request with tests on a repository with all the code required to reproduce this.
gentlegiantJGC/pybind11-crash#1
Reproducible example code
Is this a regression? Put the last known working version here if it is.
Unknown
The text was updated successfully, but these errors were encountered: