[Twisted-Python] If the errbacks of a canceled Deferred are called with error other than CancelledError, is this acceptable?

Laurens Van Houtven _ at lvh.io
Tue Jun 18 13:03:21 MDT 2013

On Tue, Jun 18, 2013 at 8:22 PM, Glyph <glyph at twistedmatrix.com> wrote:

> I would say that if we want to percolate this information up to the
> caller, there should be a ConnectingCancelled exception that is a subtype
> of the previous exception type.

Doesn't that mean we'll have many subclasses that mean that something was

If I didn't take backwards compatibility into account, I would say that
composing the original exception into a new CancellationError (or
something) exception would be preferable. Would you agree that it would be
preferable? (Again, not taking compatibility into account -- I'm trying to
get compatibility vs niceness of API to face off against each other.
Personally, I think it's enough of a change in functionality to warrant a
chance in ways a function can fail, but there's no point in even having
that argument if there's no consensus that the composed way would even be

> After all, if it's interesting that the operation was cancelled,
> presumably it's interesting *at what stage* the operation is cancelled.

IIUC that would work the same with composition as inheritance :)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://twistedmatrix.com/pipermail/twisted-python/attachments/20130618/4a93cbaf/attachment.html>

More information about the Twisted-Python mailing list