Ticket #2803 (closed defect: fixed)
findFailure fails to find the correct failure in a more complicated case
| Reported by: | Peaker | Owned by: | Peaker |
|---|---|---|---|
| Priority: | highest | Milestone: | |
| Component: | core | Keywords: | |
| Cc: | therve | Branch: | branches/findfailure-2803 |
| Author: | peaker | Launchpad Bug: |
Description
The problem is that findFailure uses the fact that the caller of the frame in which except: was used is "throwExceptionIntoGenerator" but that doesn't necessarily mean that we are actually catching *that*. We may be catching something that was re-raised from a catcher of that exception.
I think a solution would be to verify that it was indeed a yield that raised it, and not only that throwExceptionIntoGenerator is the caller frame.
I attached a patch with an extra test in test_failure's generator_tests to demonstrate the problem.
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

