[Twisted-Python] failure.Failure

Glyph Lefkowitz glyph at twistedmatrix.com
Sun May 5 20:21:03 EDT 2002


On Sat, 2002-05-04 at 02:20, Christopher Armstrong wrote:
>   The issue now is what the trap() API should be like. It used to be
> that fail.trap(types, that, I, want, to, trap) would re-raise the
> Failure if any of the types matched. This was kinda weird, as it
> requires code like:

You've got that backwards.  It would re-raise the exception if _none_ of
the types matched.

I consider this behavior important, since unless you raise an exception
or return a Failure, the next deferred stack call will be a callback,
not an errback.

-- 
 |    <`'>    |  Glyph Lefkowitz: Travelling Sorcerer  |
 |   < _/ >   |  Lead Developer,  the Twisted project  |
 |  < ___/ >  |      http://www.twistedmatrix.com      |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: This is a digitally signed message part
Url : http://twistedmatrix.com/pipermail/twisted-python/attachments/20020505/766cf8f5/attachment.pgp 


More information about the Twisted-Python mailing list