Additional error handling for command parsing

This commit is contained in:
Mark Veidemanis 2020-11-01 22:18:48 +00:00
parent 735fee9286
commit 0473c57291
1 changed files with 4 additions and 1 deletions

View File

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