Additional error handling for command parsing

This commit is contained in:
Mark Veidemanis 2020-11-01 22:18:48 +00:00
parent be405160e4
commit 73e596dac3
1 changed files with 4 additions and 1 deletions

View File

@ -172,7 +172,10 @@ class IRCBot(IRCClient):
prefix, command, params = parsemsg(line)
if command in numeric_to_symbolic:
command = numeric_to_symbolic[command]
try:
self.handleCommand(command, prefix, params)
except Exception as err:
error(err)
except IRCBadMessage:
self.badMessage(line, *sys.exc_info())