Catch the event if it isn't caught inside itself.
This commit is contained in:
1 parent
600757e43b
commit
3c8172cdf8
1 file changed
+4
-1
@@ -20,7 +20,10 @@ def addEvent(name, handler, priority = 0):
|
||||
try:
|
||||
parent = handler.im_self
|
||||
parent.beforeCall(handler)
|
||||
h = handler(*args, **kwargs)
|
||||
try:
|
||||
h = handler(*args, **kwargs)
|
||||
except:
|
||||
log.error('Error in event %s, that wasn\'nt caught: %s' % (name, traceback.format_exc()))
|
||||
parent.afterCall(handler)
|
||||
except:
|
||||
h = handler(*args, **kwargs)
|
||||
|
||||
Reference in new issue
Block a user