aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2009-03-02 19:44:46 +0000
committerMatthew Wild <mwild1@gmail.com>2009-03-02 19:44:46 +0000
commit3db74ae200f8766a2bf5588cc20e5c4905e1030a (patch)
treec976f28c8bf58b9dda8d1430b55a5c657e612adf
parent1a7a72a9f664b78bbb093a5c59620cfdadb18c93 (diff)
downloadprosody-3db74ae200f8766a2bf5588cc20e5c4905e1030a.tar.gz
prosody-3db74ae200f8766a2bf5588cc20e5c4905e1030a.zip
prosody: Log top-level errors
-rwxr-xr-xprosody10
1 files changed, 9 insertions, 1 deletions
diff --git a/prosody b/prosody
index 9a9bb683..15c94c92 100755
--- a/prosody
+++ b/prosody
@@ -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