[Patches] [ python-Patches-631276 ] Exceptions raised by line trace function

noreply@sourceforge.net noreply@sourceforge.net
Wed, 30 Oct 2002 14:06:14 -0800


Patches item #631276, was opened at 2002-10-30 22:06
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=631276&group_id=5470

Category: Core (C code)
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Richie Hindle (richiehindle)
Assigned to: Nobody/Anonymous (nobody)
Summary: Exceptions raised by line trace function

Initial Comment:
Exceptions raised by line trace functions are not handled.   I'm 
running the latest 2.3a0 (as of 30th October 2002).

When a trace function called with an event of 'line' raises an 
exception, that exception is ignored by maybe_call_line_trace.  
This means that program never sees the exception, and that the 
next genuine exception to be raised gets muddled up with the 
one raised by the trace function.  See the attached script for a 
demo.

The bug (as far as I can tell) is that maybe_call_line_trace is 
ignoring the return value of call_trace.  This patch makes 
maybe_call_line_trace pass that return value back to 
eval_frame, which then sets why to WHY_EXCEPTION and 
jumps to on_error.




----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=631276&group_id=5470