Software /
code /
prosody
Changeset
232:20745f8f4cf1
Actually show error and position when we show a traceback :)
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sun, 09 Nov 2008 20:15:31 +0000 |
parents | 231:24bcdaacc0bf |
children | 233:23585c323daa 234:7c8313e055fb |
files | net/xmppclient_listener.lua net/xmppserver_listener.lua |
diffstat | 2 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/net/xmppclient_listener.lua Sun Nov 09 20:14:58 2008 +0000 +++ b/net/xmppclient_listener.lua Sun Nov 09 20:15:31 2008 +0000 @@ -62,7 +62,7 @@ -- (I'm on a mission, no time to fix now) -- Debug version -- - local function handleerr() print("Traceback:", debug.traceback()); end + local function handleerr(err) print("Traceback:", err, debug.traceback()); end session.stanza_dispatch = function (stanza) return select(2, xpcall(function () return core_process_stanza(session, stanza); end, handleerr)); end -- session.stanza_dispatch = function (stanza) return core_process_stanza(session, stanza); end
--- a/net/xmppserver_listener.lua Sun Nov 09 20:14:58 2008 +0000 +++ b/net/xmppserver_listener.lua Sun Nov 09 20:15:31 2008 +0000 @@ -64,7 +64,7 @@ -- (I'm on a mission, no time to fix now) -- Debug version -- - local function handleerr() print("Traceback:", debug.traceback()); end + local function handleerr(err) print("Traceback:", err, debug.traceback()); end session.stanza_dispatch = function (stanza) return select(2, xpcall(function () return core_process_stanza(session, stanza); end, handleerr)); end -- session.stanza_dispatch = function (stanza) return core_process_stanza(session, stanza); end