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
I have a pybind c++ module which spawns a c++ thread. This thread then from time to time invokes a python callback, that what previously passed to the c++ thread. Now when this python callback does a raise Exception.., the c++ thread gets a pybind11::error_already_set exception, which prints just some small amount of information about the exception that happened in python, but this information looks different than the usual python like traceback.
Is it possible to forward this pybind11::error_already_set exception again back to python in order to get the "python like" traceback?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi community,
I have a pybind c++ module which spawns a c++ thread. This thread then from time to time invokes a python callback, that what previously passed to the c++ thread. Now when this python callback does a
raise Exception..
, the c++ thread gets apybind11::error_already_set
exception, which prints just some small amount of information about the exception that happened in python, but this information looks different than the usual python like traceback.Is it possible to forward this
pybind11::error_already_set
exception again back to python in order to get the "python like" traceback?Thanks in advance,
Anton
Beta Was this translation helpful? Give feedback.
All reactions