
Juraj Ivančić
Boost.Python throws error_already_set exception in case PyErr_Occurred() is true, and here PyErr functions kick in. Perhaps PyErr_Fetch() and PyErr_Restore() are what you're looking for?
These I am using already. The problem is that I am running different pieces of embedded code in different "execution environments" with different global and local dictionaries associated with different Boost.Python object being executed. I need an ability to treat an error slightly differently depending on which "environment" an error occurred in. Thus I need to know what was the global dictionary at the time (or something similar identifying the "environment"). I hoped I can attach something to the traceback object, but I need to somehow intercept it. Gennadiy