From 87c57ce38dc1aad2cb3895de67e24bb26da100f1 Mon Sep 17 00:00:00 2001 From: Michal Michalski Date: Fri, 21 Dec 2018 15:07:21 +0100 Subject: [PATCH] [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 --- src/filesystem/js/file_system_manager.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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]; -- 2.34.1