|
|
|
|||||
|
Patch to print traceback of python exceptions
Since python exceptions can occur for so many reasons in a complex setup, it's near impossible to track them down without a traceback. This patch simply hooks into the Ice exception catching to do a quick print to stderr before doing things normally.
I didn't add a config option because I'm not sure what sort of policies there are for choosing them (nor the best way to hook into it via the API). Something like Ice.Trace.UnknownExceptions=1 would be great to have for languages that can do it relatively easily (java and python that I know of). (Diff generated against IcePy-2.1.2) |
|
|||||
|
After looking at the python source, it looks like the proper way to do this is:
Code:
if( <print traceback> )
{
Py_XINCREF(t);
Py_XINCREF(val);
Py_XINCREF(tb);
PyErr_Restore(t, val, tb);
PyErr_PrintEx(0);
}
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| C# exceptions | wrobbie | Help Center | 7 | 09-25-2005 07:03 PM |
| Catching Exceptions | chuatecksiong | Help Center | 3 | 04-06-2005 01:02 PM |
| Exceptions cannot be unmarshalled on client | robert | Bug Reports | 4 | 10-17-2004 11:46 PM |
| Classes vs. Exceptions | andreynech | Comments | 7 | 02-28-2003 10:12 AM |