
28 Feb
2011
28 Feb
'11
6:32 p.m.
Hi, I am using Boost.Python quite extensively (even stretching it to the limit in some cases). Now I cave this problem: Is there any way to intercept uncaught exception in embedded Python code? I need to add some information to an exception/traceback in this case. I have full control over environment before embedded code is executed. I thought I'll be able to use sys.excepthook, but it does not seem to be invoked. Alternatively I'd can live if I can somehow retrieve the context of failed call (global/local dict?) in boost::python::error_already_set handler. Please advise, Gennadiy