$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [Boost-users] [python] intercepting uncaught exceptions
From: Gennadiy Rozental (rogeeff_at_[hidden])
Date: 2011-03-01 02:13:45
Juraj IvanÄiÄ <juraj.ivancic <at> gmail.com> writes:
> 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