Improve exception printing through !eval and !exec

This commit is contained in:
Vgr E. Barry 2016-10-30 14:03:46 -04:00
parent 57a628f135
commit e5f922d548

View File

@ -7437,7 +7437,7 @@ if botconfig.DEBUG_MODE or botconfig.ALLOWED_NORMAL_MODE_COMMANDS:
else:
cli.msg(chan, a[:500])
except Exception as e:
cli.msg(chan, str(type(e))+":"+str(e))
cli.msg(chan, repr(e))
@cmd("exec", owner_only=True, pm=True)
def py(cli, nick, chan, rest):
@ -7445,7 +7445,7 @@ if botconfig.DEBUG_MODE or botconfig.ALLOWED_NORMAL_MODE_COMMANDS:
try:
exec(rest)
except Exception as e:
cli.msg(chan, str(type(e))+":"+str(e))
cli.msg(chan, repr(e))
@cmd("revealroles", flag="a", pm=True, phases=("day", "night"))
def revealroles(cli, nick, chan, rest):