[Twisted-Python] Handling (intercepting) exceptions in twisted
itamar at itamarst.org
Sun Sep 12 16:30:34 EDT 2004
On Sun, 2004-09-12 at 16:06, Joshua Moore-Oliva wrote:
> Whenever an exception is raised, I would like to handle it instead of twisted so I can syslog and exit the application.
> Is there an excepthook for twisted that I can override to provide this functionality?
Something along the lines of:
if kwargs.has_key("failure"): # do your thing
# f will get called on all logged messages.
Note twisted has code (twisted.python.syslog) for hooking up the log system to syslog.
More information about the Twisted-Python