Twisted chainDeferred not working as expected
Posted
by
Martin Gergov
on Stack Overflow
See other posts from Stack Overflow
or by Martin Gergov
Published on 2012-11-27T15:31:36Z
Indexed on
2012/11/27
17:04 UTC
Read the original article
Hit count: 273
I have a problem figuring out a somewhat simple twisted python code. From what I have red in the docs, the code here should work without Unhandled Error.
I get this:
HELLO!
HANDLED!
HANDLED 2!
Unhandled error in Deferred:
Unhandled Error
Traceback (most recent call last):
File "package_tester.py", line 31, in <module>
a().callback(2)
File "/usr/local/lib/python2.7/dist-packages/twisted/internet/defer.py", line 368, in callback
self._startRunCallbacks(result)
File "/usr/local/lib/python2.7/dist-packages/twisted/internet/defer.py", line 464, in _startRunCallbacks
self._runCallbacks()
--- <exception caught here> ---
File "/usr/local/lib/python2.7/dist-packages/twisted/internet/defer.py", line 551, in _runCallbacks
current.result = callback(current.result, *args, **kw)
File "package_tester.py", line 5, in c
raise Exception()
exceptions.Exception:
Isn't the failure from the chained deferred passed to end() errback ?
© Stack Overflow or respective owner