Index: remoting/webapp/crd/js/xmpp_connection.js |
diff --git a/remoting/webapp/crd/js/xmpp_connection.js b/remoting/webapp/crd/js/xmpp_connection.js |
index eba06f72a1fded5ce153b3f45fa1fa68b0093859..2284dadf9dbe96adc96f08e6d8ca7fd77459401a 100644 |
--- a/remoting/webapp/crd/js/xmpp_connection.js |
+++ b/remoting/webapp/crd/js/xmpp_connection.js |
@@ -46,7 +46,7 @@ remoting.XmppConnection = function() { |
/** @private */ |
this.jid_ = ''; |
/** @private */ |
- this.error_ = remoting.Error.NONE; |
+ this.error_ = remoting.Error.none(); |
}; |
/** |
@@ -76,7 +76,7 @@ remoting.XmppConnection.prototype.connect = |
base.debug.assert(this.state_ == remoting.SignalStrategy.State.NOT_CONNECTED); |
base.debug.assert(this.onStateChangedCallback_ != null); |
- this.error_ = remoting.Error.NONE; |
+ this.error_ = remoting.Error.none(); |
var hostnameAndPort = server.split(':', 2); |
this.server_ = hostnameAndPort[0]; |
this.port_ = |
@@ -177,7 +177,7 @@ remoting.XmppConnection.prototype.onSocketConnected_ = function(result) { |
} |
if (result != 0) { |
- this.onError_(remoting.Error.NETWORK_FAILURE, |
+ this.onError_(new remoting.Error(remoting.Error.Tag.NETWORK_FAILURE), |
'Failed to connect to ' + this.server_ + ': ' + result); |
return; |
} |
@@ -218,7 +218,7 @@ remoting.XmppConnection.prototype.onRead_ = function(readInfo) { |
} |
if (readInfo.resultCode < 0) { |
- this.onError_(remoting.Error.NETWORK_FAILURE, |
+ this.onError_(new remoting.Error(remoting.Error.Tag.NETWORK_FAILURE), |
'Failed to receive from XMPP socket: ' + readInfo.resultCode); |
return; |
} |
@@ -280,7 +280,7 @@ remoting.XmppConnection.prototype.onWrite_ = function(writeInfo) { |
} |
if (writeInfo.bytesWritten < 0) { |
- this.onError_(remoting.Error.NETWORK_FAILURE, |
+ this.onError_(new remoting.Error(remoting.Error.Tag.NETWORK_FAILURE), |
'TCP write failed with error ' + writeInfo.bytesWritten); |
return; |
} |
@@ -319,7 +319,7 @@ remoting.XmppConnection.prototype.onTlsStarted_ = function(resultCode) { |
this.startTlsPending_ = false; |
if (resultCode < 0) { |
- this.onError_(remoting.Error.NETWORK_FAILURE, |
+ this.onError_(new remoting.Error(remoting.Error.Tag.NETWORK_FAILURE), |
'Failed to start TLS: ' + resultCode); |
return; |
} |
@@ -357,7 +357,7 @@ remoting.XmppConnection.prototype.onIncomingStanza_ = function(stanza) { |
* @private |
*/ |
remoting.XmppConnection.prototype.onParserError_ = function(text) { |
- this.onError_(remoting.Error.UNEXPECTED, text); |
+ this.onError_(remoting.Error.unexpected(), text); |
} |
/** |