[Verification] Code compiles without errors.
Manual test SoundManager_removeDeviceStateChangeListener passes.
Change-Id: I81cd390cbed3eff74f97211c34de464c198fa5d8
Signed-off-by: Tomasz Marciniak <t.marciniak@samsung.com>
ListenerManager.prototype.removeListener = function(watchId) {
if (this.listeners.hasOwnProperty(watchId)) {
delete this.listeners[watchId];
+ } else {
+ throw new WebAPIException(WebAPIException.INVALID_VALUES_ERR,
+ 'Listener with id: ' + watchId + ' does not exist.');
}
if (this.nativeSet && type_.isEmptyObject(this.listeners)) {