aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2008-11-09 20:15:31 +0000
committerMatthew Wild <mwild1@gmail.com>2008-11-09 20:15:31 +0000
commitbc83d650a03de76cad050fda72b1108924cb282b (patch)
tree6bb2809a1317f5c8c8bed2d05ba5566496ee6f09 /net
parenta94c596c02852294020e5d1b86a70e04ec4b9e5d (diff)
downloadprosody-bc83d650a03de76cad050fda72b1108924cb282b.tar.gz
prosody-bc83d650a03de76cad050fda72b1108924cb282b.zip
Actually show error and position when we show a traceback :)
Diffstat (limited to 'net')
-rw-r--r--net/xmppclient_listener.lua2
-rw-r--r--net/xmppserver_listener.lua2
2 files changed, 2 insertions, 2 deletions
diff --git a/net/xmppclient_listener.lua b/net/xmppclient_listener.lua
index 64747bc5..ca4cbbb0 100644
--- a/net/xmppclient_listener.lua
+++ b/net/xmppclient_listener.lua
@@ -62,7 +62,7 @@ function xmppclient.listener(conn, data)
-- (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
diff --git a/net/xmppserver_listener.lua b/net/xmppserver_listener.lua
index f8b5d1c8..ee3faa8f 100644
--- a/net/xmppserver_listener.lua
+++ b/net/xmppserver_listener.lua
@@ -64,7 +64,7 @@ function xmppserver.listener(conn, data)
-- (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