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 am trying to make a C++ exception class available in python. This class has some member variables and member functions that I would like to also make available in Python. The pybind11::register_exception<T> function returns a pybind11::exception<T>, which doesn't have def(...), def_property(...), etc.
How do I do such a definition?
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
-
I am trying to make a C++ exception class available in python. This class has some member variables and member functions that I would like to also make available in Python. The
pybind11::register_exception<T>
function returns apybind11::exception<T>
, which doesn't havedef(...)
,def_property(...)
, etc.How do I do such a definition?
I tried the following:
But I'm getting an error at runtime:
ImportError: Error during initialization: multiple incompatible definitions with name "MargoException"
.Beta Was this translation helpful? Give feedback.
All reactions