# Erebus IRC bot - Author: Erebus Team
# vim: fileencoding=utf-8
+# A basic exception hook. Sends exceptions to `[exception_hook] destination` in the config.
# This file is released into the public domain; see http://unlicense.org/
# module info
dest = lib.parent.cfg.get('exception_hook', 'destination')
if dest is not None:
bot.msg(dest, '%s exception: %r %r' % (source, args, kwargs))
- for line in traceback.format_exc(limit=lib.parent.cfg.getint('exception_hook', 'limit', 5)).split("\n"):
+ for line in traceback.format_exc(limit=-lib.parent.cfg.getint('exception_hook', 'limit', 5)).split("\n"):
bot.msg(dest, (' '*4) + line)