Opened 6 years ago

Last modified 4 years ago

#5507 defect new

twisted.spread.pb.CopiedFailure.raiseException can't work

Reported by: Jean-Paul Calderone Owned by:
Priority: normal Milestone:
Component: pb Keywords:
Cc: warner, Louis Branch:


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 (2)

comment:1 Changed 6 years ago by DefaultCC Plugin

Cc: warner added

comment:2 Changed 4 years ago by Louis

Cc: Louis added
Note: See TracTickets for help on using tickets.