Additional error handling for command parsing
This commit is contained in:
parent
be405160e4
commit
73e596dac3
|
@ -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]
|
||||||
self.handleCommand(command, prefix, params)
|
try:
|
||||||
|
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())
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue