Ticket #5507 defect new
Opened 15 months ago
twisted.spread.pb.CopiedFailure.raiseException can't work
| Reported by: | exarkun | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | pb | Keywords: | |
| Cc: | warner | Branch: | |
| Author: | Launchpad Bug: |
Description
CopiedFailure always has a string for self.type. Any code that treats self.type as an exception class is going to encounter problems.
Previously this arose as a problem with `CopiedFailure.throwExceptionIntoGenerator`.
It is also a problem for CopiedFailure.raiseException, which simply does:
raise self.type, self.value, self.tb
A string exception cannot be raised in the newest versions of Python, and even if it could be, it would be the wrong exception to raise.
Change History
Note: See
TracTickets for help on using
tickets.
