Issue1249
Created on 2009-01-27.08:11:18 by jha, last changed 2009-03-26.16:49:39 by pjenvey.
File name |
Uploaded |
Description |
Edit |
Remove |
trace_exc.py
|
jha,
2009-01-27.08:11:15
|
|
|
|
msg4084 (view) |
Author: (jha) |
Date: 2009-01-27.08:11:15 |
|
Running the attached script with Jython (r5984) produces:
~> java -jar jython.jar /tmp/trace_exc.py
<trace> call in bar @ 13
<trace> line in bar @ 14
<trace> call in foo @ 7
<trace> line in foo @ 9
<trace> line in foo @ 11
<trace> exception in foo @ 11
<trace> exception in bar @ 14
..and running with CPython (2.5.1, 2.5.2, 2.6) produces:
~> python /tmp/trace_exc.py
<trace> call in bar @ 13
<trace> line in bar @ 14
<trace> call in foo @ 7
<trace> line in foo @ 8
<trace> line in foo @ 9
<trace> exception in foo @ 9
<trace> line in foo @ 11
<trace> return in foo @ 11
<trace> exception in bar @ 14
<trace> return in bar @ 14
Jython calls the trace function with an exception event at the end of
the finally block when the exception is reraised and the frame is
exited. CPython reports the event when the exception occurs.
|
msg4089 (view) |
Author: (jha) |
Date: 2009-01-27.12:59:27 |
|
Before r5815 the behavior was this (still differs from CPython):
<trace> call in bar @ 13
<trace> line in bar @ 14
<trace> call in foo @ 7
<trace> line in foo @ 9
<trace> exception in foo @ 9
<trace> line in foo @ 11
<trace> exception in foo @ 11
<trace> exception in bar @ 14
So the exception event is reported when it occurs and every time it is
reraised/frame is exited.
|
msg4091 (view) |
Author: Philip Jenvey (pjenvey) |
Date: 2009-01-27.20:11:03 |
|
I broke this, over to me
|
msg4356 (view) |
Author: Philip Jenvey (pjenvey) |
Date: 2009-03-26.16:49:38 |
|
restored to the previous behavior as of r6108, thanks
|
|
Date |
User |
Action |
Args |
2009-03-26 16:49:39 | pjenvey | set | status: open -> closed resolution: fixed messages:
+ msg4356 |
2009-01-27 20:11:04 | pjenvey | set | assignee: pjenvey messages:
+ msg4091 nosy:
+ pjenvey |
2009-01-27 12:59:27 | jha | set | messages:
+ msg4089 |
2009-01-27 08:11:19 | jha | create | |
|