Opened 12 years ago

Closed 12 years ago

#2318 defect closed duplicate (duplicate)

Bug in how pb handles synchronous pb.Errors in remote_foo methods

Reported by: bgranger Owned by:
Priority: normal Milestone:
Component: pb Keywords: pb, error, failure
Cc: Branch:


According to the twisted docs, any exception that inherits from pb.Error will be passed back across the wire. However, there are cases where this is not true:

 def remote_foo(self, f):
       d =
       def raiser():
           raise pb.Error('I pbfailed')
       d.addErrback(lambda reason: raiser()) # reason = Exception(), not pb.Error
       return d

This does not result in the pb.Error being handled in the expected way (this process will complain. This type of usage case is useful for converting general exceptions to pb.Errors.

According to Jean-Paul:

"This is a bug in PB's handling of Deferreds which fail with an Error. They are not handled in the same way as Errors which are raised synchronously by the method to which the PB message is dispatched."

Change History (2)

comment:1 Changed 12 years ago by bgranger

Resolution: duplicate
Status: newclosed

comment:2 Changed 8 years ago by <automation>

Owner: warner deleted
Note: See TracTickets for help on using tickets.