mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-01 09:19:23 +01:00
ServiceBot: display custom error messages for NotAuthenticatedError
This commit is contained in:
parent
945818e1d8
commit
7d2b22630d
4
utils.py
4
utils.py
@ -266,8 +266,8 @@ class ServiceBot():
|
||||
for func in self.commands[cmd]:
|
||||
try:
|
||||
func(irc, source, cmd_args)
|
||||
except NotAuthenticatedError:
|
||||
self.reply(irc, 'Error: You are not authorized to perform this operation.')
|
||||
except NotAuthenticatedError as e:
|
||||
self.reply(irc, 'Error: Not authorized. %s' % e)
|
||||
except Exception as e:
|
||||
log.exception('Unhandled exception caught in command %r', cmd)
|
||||
self.reply(irc, 'Uncaught exception in command %r: %s: %s' % (cmd, type(e).__name__, str(e)))
|
||||
|
Loading…
Reference in New Issue
Block a user