mirror of
https://github.com/jlu5/PyLink.git
synced 2025-05-08 07:37:33 +02:00
classes: log offending hook data when a hook function errors
Closes #126.
This commit is contained in:
parent
2eeba50a2a
commit
b0e66ddd6e
@ -287,8 +287,10 @@ class Irc():
|
|||||||
hook_func(self, numeric, command, parsed_args)
|
hook_func(self, numeric, command, parsed_args)
|
||||||
except Exception:
|
except Exception:
|
||||||
# We don't want plugins to crash our servers...
|
# We don't want plugins to crash our servers...
|
||||||
log.exception('(%s) Unhandled exception caught in %r',
|
log.exception('(%s) Unhandled exception caught in hook %r from plugin "%s"',
|
||||||
self.name, hook_func)
|
self.name, hook_func, hook_func.__module__)
|
||||||
|
log.error('(%s) The offending hook data was: %s', self.name,
|
||||||
|
hook_args)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
def send(self, data):
|
def send(self, data):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user