[Twisted-Python] problems with tracebacks

Manlio Perillo manlio_perillo at libero.it
Sat Aug 5 10:09:54 MDT 2006


Jean-Paul Calderone ha scritto:
> On Fri, 04 Aug 2006 23:16:00 +0200, Manlio Perillo
> <manlio_perillo at libero.it> wrote:
>>
>>        msg = flatten(email)
>>    except Exception, reason:
>>        return defer.fail(reason)
>>
> 
> Here you create a Deferred with a Failure with no traceback associated
> with it.  Try returning "defer.fail()" instead.
> 

Ok, thanks.
But this means that I cannot use defer.fail to report an exception directly.

As an example

if a < 0:
  return defer.fail(RuntimeError("must be non negative"))


does not print a traceback.



Regards  Manlio Perillo




More information about the Twisted-Python mailing list