Software /
code /
prosody
Diff
util/xmppstream.lua @ 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 |
parent | 4484:0da4e0f0f0ef |
child | 5776:bd0ff8ae98a8 |
child | 6042:1107d66d2ab2 |
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;