aboutsummaryrefslogtreecommitdiffstats
path: root/prosody
diff options
context:
space:
mode:
Diffstat (limited to 'prosody')
-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