On 02:35 pm, chris at simplistix.co.uk wrote:
>On 30/09/2010 15:23, Phil Mayers wrote:
>>>def loop():
>>>d = maybeDeferred(doStuff)
>>>d.addErrback(partial(log.err,_why='Unhandled scheduled exception'))
>>>>>So, how come my log.err doesn't get used for the AttributeError on
>>>connector?
>>>>If you mean in your most recent "test_looping.py" example, it still
>>uses
>>reactor.callLater. The call stack has gone away by the time the call
>>is
>>made, so the exception just propagates up to the top level, where it's
>>logged.
>>So, I appear to be back to the case where I can either gracefully
>handle
>the exception *or* gracefully handle the errback, but not both?
No. Absolutely, categorically wrong.
Jean-Paul