Extending Python built-in exceptions to C ++

If I have C ++ code with built-in Python functions, that is, it uses the Python C API to call the Python interpreter, how can I get Python exceptions to go to the C ++ level?


Note. This is not a backward question (about extending C ++ extension exceptions to the Python interpreter).

+4
source share
1 answer

https://docs.python.org/2/c-api/exceptions.html

PyErr_PrintEx(0) - this will print a trace.

+2
source

Source: https://habr.com/ru/post/1543621/


All Articles