Additional error handling for command parsing
This commit is contained in:
parent
735fee9286
commit
0473c57291
|
@ -172,7 +172,10 @@ class IRCBot(IRCClient):
|
|||
prefix, command, params = parsemsg(line)
|
||||
if command in numeric_to_symbolic:
|
||||
command = numeric_to_symbolic[command]
|
||||
self.handleCommand(command, prefix, params)
|
||||
try:
|
||||
self.handleCommand(command, prefix, params)
|
||||
except Exception as err:
|
||||
error(err)
|
||||
except IRCBadMessage:
|
||||
self.badMessage(line, *sys.exc_info())
|
||||
|
||||
|
|
Loading…
Reference in New Issue