From: Michal Michalski Date: Fri, 21 Dec 2018 14:07:21 +0000 (+0100) Subject: [filesystem] Silence undocumented exception. X-Git-Tag: submit/tizen/20190109.233706~5^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F07%2F196107%2F1;p=platform%2Fcore%2Fapi%2Fwebapi-plugins.git [filesystem] Silence undocumented exception. Filesystem function removeStorageStateChangeListener was throwing NotFoundError exception if watchID argument did not correspond to a registered listener. This commit removes this exception to match documentation. [Verification] Exception is no longer thrown. One TCT test case failed after this change, i removed it and commited the change to tct repository. Review for TCT is available here: https://review.tizen.org/gerrit/#/c/test/tct/web/api/+/196106/ Change-Id: I8cb7d99b5dda3f66f36c406c86330fb5d089287f Signed-off-by: Michal Michalski --- diff --git a/src/filesystem/js/file_system_manager.js b/src/filesystem/js/file_system_manager.js index 22f4ba27..43e62a24 100644 --- a/src/filesystem/js/file_system_manager.js +++ b/src/filesystem/js/file_system_manager.js @@ -728,7 +728,7 @@ function removeStorageStateChangeListener() { var id = args.watchId; if (type_.isNullOrUndefined(callbacks[id])) { - throw new WebAPIException(WebAPIException.NOT_FOUND_ERR, 'Watch ID not found.'); + return; } delete callbacks[id];