Software /
code /
prosody
Comparison
net/xmppclient_listener.lua @ 226:ba4711c4e8d2
Committing code to get nicer tracebacks for errors, also we no longer consider such errors fatal (probably a bad thing, I know...)
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sat, 08 Nov 2008 20:42:23 +0000 |
parent | 166:d4ee015fcee4 |
child | 232:20745f8f4cf1 |
comparison
equal
deleted
inserted
replaced
225:bbbd169b326b | 226:ba4711c4e8d2 |
---|---|
58 session_reset_stream(session); -- Initialise, ready for use | 58 session_reset_stream(session); -- Initialise, ready for use |
59 | 59 |
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 session.stanza_dispatch = function (stanza) return core_process_stanza(session, stanza); end | 63 |
64 -- Debug version -- | |
65 local function handleerr() print("Traceback:", debug.traceback()); end | |
66 session.stanza_dispatch = function (stanza) return select(2, xpcall(function () return core_process_stanza(session, stanza); end, handleerr)); end | |
67 | |
68 -- session.stanza_dispatch = function (stanza) return core_process_stanza(session, stanza); end | |
64 | 69 |
65 end | 70 end |
66 if data then | 71 if data then |
67 session.data(conn, data); | 72 session.data(conn, data); |
68 end | 73 end |