3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-27 13:09:23 +01:00

classes: log offending hook data when a hook function errors

Closes #126.
This commit is contained in:
James Lu 2015-11-08 10:56:09 -08:00
parent 2eeba50a2a
commit b0e66ddd6e

View File

@ -287,8 +287,10 @@ class Irc():
hook_func(self, numeric, command, parsed_args)
except Exception:
# We don't want plugins to crash our servers...
log.exception('(%s) Unhandled exception caught in %r',
self.name, hook_func)
log.exception('(%s) Unhandled exception caught in hook %r from plugin "%s"',
self.name, hook_func, hook_func.__module__)
log.error('(%s) The offending hook data was: %s', self.name,
hook_args)
continue
def send(self, data):