From 7351fe1a0226298419e3d174d7b156daad91c131 Mon Sep 17 00:00:00 2001 From: Lance Stout Date: Thu, 4 Nov 2010 14:35:35 -0400 Subject: Fix bug introduced while fixing another bug. Threaded event handlers now handle exceptions again. --- sleekxmpp/xmlstream/xmlstream.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'sleekxmpp') diff --git a/sleekxmpp/xmlstream/xmlstream.py b/sleekxmpp/xmlstream/xmlstream.py index 218b4b5a..a5262814 100644 --- a/sleekxmpp/xmlstream/xmlstream.py +++ b/sleekxmpp/xmlstream/xmlstream.py @@ -828,8 +828,11 @@ class XMLStream(object): """ try: func(*args) - except: - pass + except Exception as e: + error_msg = 'Error processing event handler: %s' + logging.exception(error_msg % str(func)) + if hasattr(args[0], 'exception'): + args[0].exception(e) def _event_runner(self): """ -- cgit v1.2.3