mirror of
https://github.com/jlu5/PyLink.git
synced 2024-12-24 11:42:51 +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]:
|
||||
try:
|
||||
func(irc, source, cmd_args)
|
||||
except NotAuthorizedError as e:
|
||||
except (NotAuthorizedError, InvalidArgumentsError) as e:
|
||||
self.reply(irc, 'Error: %s' % e)
|
||||
except Exception as e:
|
||||
log.exception('Unhandled exception caught in command %r', cmd)
|
||||
|
Loading…
Reference in New Issue
Block a user