Ticket #5507 defect new

Opened 2 years 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:


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


Changed 2 years ago by DefaultCC Plugin

  • cc warner added
Note: See TracTickets for help on using tickets.