]> jfr.im git - erebus.git/blobdiff - modules/exception_hook.py
update comments
[erebus.git] / modules / exception_hook.py
index 5c089ea1a65b77ec1d0141fa9641a8899b4736bf..78b51bab37d4f79edcc85f40c76b77b012a8ca2d 100644 (file)
@@ -1,5 +1,6 @@
 # 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
@@ -25,5 +26,5 @@ def got_exception(bot, exc, source, *args, **kwargs):
        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)