diff options
author | Matthew Wild <mwild1@gmail.com> | 2009-03-02 19:44:46 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2009-03-02 19:44:46 +0000 |
commit | 3db74ae200f8766a2bf5588cc20e5c4905e1030a (patch) | |
tree | c976f28c8bf58b9dda8d1430b55a5c657e612adf | |
parent | 1a7a72a9f664b78bbb093a5c59620cfdadb18c93 (diff) | |
download | prosody-3db74ae200f8766a2bf5588cc20e5c4905e1030a.tar.gz prosody-3db74ae200f8766a2bf5588cc20e5c4905e1030a.zip |
prosody: Log top-level errors
-rwxr-xr-x | prosody | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -158,6 +158,14 @@ while not quitting do quitting = true; return; end - eventmanager.fire_event("very-bad-error", "*", err, debug.traceback("", 2)); + + log("error", "Top-level error, please report:\n%s", tostring(err)); + + local traceback = debug.traceback("", 2); + if traceback then + log("error", "%s", traceback); + end + + eventmanager.fire_event("very-bad-error", "*", err, traceback); end); end |