3
0
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:
James Lu 2017-03-06 16:30:19 -08:00
parent ca93d1ad70
commit 225b0ac8b2

View File

@ -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)