Changeset

5311:86fe6e2fa5ae

util.xmppstream: Include error stanza in error message if no error handler is available.
author Waqas Hussain <waqas20@gmail.com>
date Sat, 26 Jan 2013 03:39:18 +0500
parents 5310:bc60cad47397
children 5312:fdcd2ac7c22d
files util/xmppstream.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/util/xmppstream.lua	Fri Jan 25 00:36:17 2013 +0100
+++ b/util/xmppstream.lua	Sat Jan 26 03:39:18 2013 +0500
@@ -45,7 +45,7 @@
 	
 	local cb_streamopened = stream_callbacks.streamopened;
 	local cb_streamclosed = stream_callbacks.streamclosed;
-	local cb_error = stream_callbacks.error or function(session, e) error("XML stream error: "..tostring(e)); end;
+	local cb_error = stream_callbacks.error or function(session, e, stanza) error("XML stream error: "..tostring(e)..(stanza and ": "..tostring(stanza) or ""),2); end;
 	local cb_handlestanza = stream_callbacks.handlestanza;
 	
 	local stream_ns = stream_callbacks.stream_ns or xmlns_streams;