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

noreply@sourceforge.net noreply@sourceforge.net
Thu, 31 Oct 2002 06:38:18 -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: Michael Hudson (mwh)
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.




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

>Comment By: Richie Hindle (richiehindle)
Date: 2002-10-31 14:38

Message:
Logged In: YES 
user_id=85414

Will do, later today.

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

Comment By: Michael Hudson (mwh)
Date: 2002-10-31 10:38

Message:
Logged In: YES 
user_id=6656

Blame for this one is easy to find...

Patch looks OK.  Could I ask you to munge the test into a
patch to test_trace?  Otherwise I'll do it, but maybe not today.

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

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