Comparison

net/xmppclient_listener.lua @ 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
parent 226:ba4711c4e8d2
child 267:6303b7454ad0
comparison
equal deleted inserted replaced
231:24bcdaacc0bf 232:20745f8f4cf1
60 -- TODO: Below function should be session,stanza - and xmlhandlers should use :method() notation to call, 60 -- TODO: Below function should be session,stanza - and xmlhandlers should use :method() notation to call,
61 -- this will avoid the useless indirection we have atm 61 -- this will avoid the useless indirection we have atm
62 -- (I'm on a mission, no time to fix now) 62 -- (I'm on a mission, no time to fix now)
63 63
64 -- Debug version -- 64 -- Debug version --
65 local function handleerr() print("Traceback:", debug.traceback()); end 65 local function handleerr(err) print("Traceback:", err, debug.traceback()); end
66 session.stanza_dispatch = function (stanza) return select(2, xpcall(function () return core_process_stanza(session, stanza); end, handleerr)); end 66 session.stanza_dispatch = function (stanza) return select(2, xpcall(function () return core_process_stanza(session, stanza); end, handleerr)); end
67 67
68 -- session.stanza_dispatch = function (stanza) return core_process_stanza(session, stanza); end 68 -- session.stanza_dispatch = function (stanza) return core_process_stanza(session, stanza); end
69 69
70 end 70 end