Actually show error and position when we show a traceback :)
authorMatthew Wild <mwild1@gmail.com>
Sun, 09 Nov 2008 20:15:31 +0000
changeset 232 20745f8f4cf1
parent 231 24bcdaacc0bf
child 233 23585c323daa
child 234 7c8313e055fb
Actually show error and position when we show a traceback :)
net/xmppclient_listener.lua
net/xmppserver_listener.lua
--- 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