62 -- FIXME: Below function should be session,stanza - and xmlhandlers should use :method() notation to call, |
62 -- FIXME: Below function should be session,stanza - and xmlhandlers should use :method() notation to call, |
63 -- this will avoid the useless indirection we have atm |
63 -- this will avoid the useless indirection we have atm |
64 -- (I'm on a mission, no time to fix now) |
64 -- (I'm on a mission, no time to fix now) |
65 |
65 |
66 -- Debug version -- |
66 -- Debug version -- |
67 local function handleerr() print("Traceback:", debug.traceback()); end |
67 local function handleerr(err) print("Traceback:", err, debug.traceback()); end |
68 session.stanza_dispatch = function (stanza) return select(2, xpcall(function () return core_process_stanza(session, stanza); end, handleerr)); end |
68 session.stanza_dispatch = function (stanza) return select(2, xpcall(function () return core_process_stanza(session, stanza); end, handleerr)); end |
69 |
69 |
70 -- session.stanza_dispatch = function (stanza) return core_process_stanza(session, stanza); end |
70 -- session.stanza_dispatch = function (stanza) return core_process_stanza(session, stanza); end |
71 |
71 |
72 end |
72 end |