# HG changeset patch # User Matthew Wild # Date 1236023086 0 # Node ID c0a40522041e4fbaad72cb5c52ad356710a1e458 # Parent 3c2d99ba1dc20dc6ca407ceba88ae45aac0821ee prosody: Log top-level errors diff -r 3c2d99ba1dc2 -r c0a40522041e prosody --- a/prosody Mon Mar 02 13:52:08 2009 +0000 +++ b/prosody Mon Mar 02 19:44:46 2009 +0000 @@ -158,6 +158,14 @@ 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