}
]);
- if (this.connectionState == ConnectionState.CONNECTED)
- throw new WebAPIException('InvalidStateError', 'Service is connected already.');
+ if (this.connectionState == ConnectionState.CONNECTED) {
+ throw new WebAPIException(WebAPIException.INVALID_STATE_ERR, 'Service is connected already.');
+ }
var lid = this._serviceId;
this._connectCallback = successCallback;
]);
if (this.connectionState != ConnectionState.CONNECTED) {
- throw new WebAPIException('InvalidStateError', 'Service is not connected yet.');
+ throw new WebAPIException(WebAPIException.INVALID_STATE_ERR, 'Service is not connected yet.');
}
var result = native_.call('RemoteAppControlService_disconnect', {