DrBotIRC: swallow the rare exception that trickles up this far

This commit is contained in:
Brian S. Stephan 2011-10-18 00:48:11 -05:00
parent d4f7941b7b
commit b82dd382ee
1 changed files with 5 additions and 2 deletions

View File

@ -110,8 +110,11 @@ class DrBotIRC(irclib.IRC):
h = self.handlers
for handler in h.get("all_events", []) + h.get(event.eventtype(), []):
if handler[1](connection, event) == "NO MORE":
return
try:
if handler[1](connection, event) == "NO MORE":
return
except Exception as e:
print("exception floated up to DrBotIrc: " + str(e))
def try_to_replace_event_text_with_module_text(self, connection, event):
"""Do something very similar to _handle_event, but for recursion.