mirror of
https://github.com/jlu5/PyLink.git
synced 2024-12-25 04:02:45 +01:00
ServiceBot: catch InvalidArgumentsError for prettier error display on IRC
This commit is contained in:
parent
ca93d1ad70
commit
225b0ac8b2
2
utils.py
2
utils.py
@ -329,7 +329,7 @@ class ServiceBot():
|
|||||||
for func in self.commands[cmd]:
|
for func in self.commands[cmd]:
|
||||||
try:
|
try:
|
||||||
func(irc, source, cmd_args)
|
func(irc, source, cmd_args)
|
||||||
except NotAuthorizedError as e:
|
except (NotAuthorizedError, InvalidArgumentsError) as e:
|
||||||
self.reply(irc, 'Error: %s' % e)
|
self.reply(irc, 'Error: %s' % e)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
log.exception('Unhandled exception caught in command %r', cmd)
|
log.exception('Unhandled exception caught in command %r', cmd)
|
||||||
|
Loading…
Reference in New Issue
Block a user