[Pkg-javascript-commits] [ltx] 118/469: connection error(): emit 'error' with message instead of condition
Jonas Smedegaard
dr at jones.dk
Wed Aug 31 13:01:11 UTC 2016
This is an automated email from the git hooks/post-receive script.
js pushed a commit to branch master
in repository ltx.
commit 02568db5909aa154eddd8c729deb6cb048ac32a0
Author: Astro <astro at spaceboyz.net>
Date: Thu Sep 9 01:40:07 2010 +0200
connection error(): emit 'error' with message instead of condition
---
lib/xmpp/connection.js | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib/xmpp/connection.js b/lib/xmpp/connection.js
index 49aa5f1..910a070 100644
--- a/lib/xmpp/connection.js
+++ b/lib/xmpp/connection.js
@@ -187,18 +187,18 @@ Connection.prototype.end = function() {
* @param {String} condition XMPP error condition, see RFC3920 4.7.3. Defined Conditions
* @param {String} text Optional error message
*/
-Connection.prototype.error = function(condition, text) {
- this.emit('error', new Error(condition));
+Connection.prototype.error = function(condition, message) {
+ this.emit('error', new Error(message));
if (!this.writable)
return;
var e = new xml.Element('stream:error');
e.c(condition, { xmlns: NS_XMPP_STREAMS });
- if (text)
+ if (message)
e.c('text', { xmlns: NS_XMPP_STREAMS,
'xml:lang': 'en' }).
- t(text);
+ t(message);
this.send(e);
this.end();
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/ltx.git
More information about the Pkg-javascript-commits
mailing list