Index: remoting/webapp/crd/js/session_connector_impl.js |
diff --git a/remoting/webapp/crd/js/session_connector_impl.js b/remoting/webapp/crd/js/session_connector_impl.js |
index b415a47f8ba0ac9a662d2a59623d1e30f29bbc40..b84feee9a8dddd85227d24242f1b31120a195569 100644 |
--- a/remoting/webapp/crd/js/session_connector_impl.js |
+++ b/remoting/webapp/crd/js/session_connector_impl.js |
@@ -344,13 +344,14 @@ remoting.SessionConnectorImpl.prototype.onPluginInitialized_ = function( |
initialized) { |
if (!initialized) { |
console.error('ERROR: remoting plugin not loaded'); |
- this.pluginError_(remoting.Error.MISSING_PLUGIN); |
+ this.pluginError_(new remoting.Error(remoting.Error.Tag.MISSING_PLUGIN)); |
return; |
} |
if (!this.plugin_.isSupportedVersion()) { |
console.error('ERROR: bad plugin version'); |
- this.pluginError_(remoting.Error.BAD_PLUGIN_VERSION); |
+ this.pluginError_(new remoting.Error( |
+ remoting.Error.Tag.BAD_PLUGIN_VERSION)); |
return; |
} |
@@ -506,14 +507,15 @@ remoting.SessionConnectorImpl.prototype.onStateChange_ = function(event) { |
// accepting it. Since there's no way of knowing exactly what went wrong, |
// we rely on server-side logs in this case and report a generic error |
// message. |
- this.onError_(remoting.Error.UNEXPECTED); |
+ this.onError_(remoting.Error.unexpected()); |
break; |
case remoting.ClientSession.State.FAILED: |
var error = this.clientSession_.getError(); |
- console.error('Client plugin reported connection failed: ' + error); |
+ console.error('Client plugin reported connection failed: ' + |
+ error.toString()); |
if (error == null) { |
- error = remoting.Error.UNEXPECTED; |
+ error = remoting.Error.unexpected(); |
} |
this.onConnectionFailed_(error); |
break; |
@@ -522,7 +524,7 @@ remoting.SessionConnectorImpl.prototype.onStateChange_ = function(event) { |
console.error('Unexpected client plugin state: ' + event.current); |
// This should only happen if the web-app and client plugin get out of |
// sync, and even then the version check should ensure compatibility. |
- this.onError_(remoting.Error.MISSING_PLUGIN); |
+ this.onError_(new remoting.Error(remoting.Error.Tag.MISSING_PLUGIN)); |
} |
}; |