If I have C++ code with embedded Python functions, i.e. it uses Python's C API to call Python's interpreter, how can I get Python exceptions to bubble up to the C++ level?
Note: This is not the inverse question (about propagating C++ extension exceptions up to the Python intepreter).
https://docs.python.org/2/c-api/exceptions.html
specifically, PyErr_PrintEx(0)
-- this will print a traceback.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With