[Twisted-Python] global exception handler

Itamar Turner-Trauring itamar at itamarst.org
Thu Aug 12 06:55:46 MDT 2010


On Thu, 2010-08-12 at 14:26 +0200, Zoran Bosnjak wrote:
> Hello all,
> is there a possibility to have a global (application wide) exception
> handler in twisted application? I would like to stop application in case
> of any unhandled error in deferred callbacks.

Why not add an error handler yourself for these Deferreds?

It is possible to get a function called for all unhandled errors by
adding a log observer
(http://twistedmatrix.com/documents/current/core/howto/logging.html#auto5) but this logging only happens on garbage collection of the Deferred, which means it can be delayed indefinitely in some cases.





More information about the Twisted-Python mailing list