mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-02-23 09:00:46 +01:00
Added a log.exception to Owner.eval.
This commit is contained in:
parent
4c37c1c79b
commit
9363489e32
@ -384,7 +384,7 @@ class Owner(privmsgs.CapabilityCheckingPrivmsg):
|
|||||||
|
|
||||||
Evaluates <expression> (which should be a Python expression) and
|
Evaluates <expression> (which should be a Python expression) and
|
||||||
returns its value. If an exception is raised, reports the
|
returns its value. If an exception is raised, reports the
|
||||||
exception.
|
exception (and logs the traceback to the bot's logfile).
|
||||||
"""
|
"""
|
||||||
if conf.allowEval:
|
if conf.allowEval:
|
||||||
s = privmsgs.getArgs(args)
|
s = privmsgs.getArgs(args)
|
||||||
@ -398,7 +398,10 @@ class Owner(privmsgs.CapabilityCheckingPrivmsg):
|
|||||||
except SyntaxError, e:
|
except SyntaxError, e:
|
||||||
irc.reply('%s: %r' % (utils.exnToString(e), s))
|
irc.reply('%s: %r' % (utils.exnToString(e), s))
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
irc.reply(utils.exnToString(e))
|
self.log.exception('Uncaught exception in Owner.eval. '
|
||||||
|
'This is not a bug. Please do not '
|
||||||
|
'report it.')
|
||||||
|
irc.reply(utils.exnToString(e)j
|
||||||
else:
|
else:
|
||||||
# There's a potential that allowEval got changed after we were
|
# There's a potential that allowEval got changed after we were
|
||||||
# loaded. Let's be extra-special-safe.
|
# loaded. Let's be extra-special-safe.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user