catch all Exception when calling the handlers, to avoid a crash there.
this used to be in the bot before we moved this code around
This commit is contained in:
parent
d592d3f3bb
commit
c4ade3cbca
13
DrBotIRC.py
13
DrBotIRC.py
@ -233,11 +233,14 @@ class DrBotIRC(irclib.IRC):
|
||||
|
||||
# aliases resolved. run result against each module
|
||||
for (priority, handler) in self.internal_bus:
|
||||
ret = handler(connection, event, nick, userhost, attempt, admin_unlocked)
|
||||
if ret is not None:
|
||||
# a module had a result for us, post-alias, so return it
|
||||
# TODO: scan all modules with compounding results
|
||||
return ret
|
||||
try:
|
||||
ret = handler(connection, event, nick, userhost, attempt, admin_unlocked)
|
||||
if ret is not None:
|
||||
# a module had a result for us, post-alias, so return it
|
||||
# TODO: scan all modules with compounding results
|
||||
return ret
|
||||
except Exception as e:
|
||||
print('EXCEPTION: ' + str(e))
|
||||
|
||||
def quit_irc(self, connection, msg):
|
||||
for module in self.modlist:
|
||||
|
Loading…
Reference in New Issue
Block a user