From: Pawel Andruszkiewicz Date: Thu, 2 Jul 2015 08:01:03 +0000 (+0200) Subject: [Filesystem] In case of error invoke callback instead of throwing an exception. X-Git-Tag: submit/tizen/20150702.103311^2~1^2^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=038d01d097e66ae2a69613bc91317a89ce8c2c85;p=platform%2Fcore%2Fapi%2Fwebapi-plugins.git [Filesystem] In case of error invoke callback instead of throwing an exception. [Verification] TCT pass rate: 100% Change-Id: I4b3986bd249ad1ebc1459eb50525ddd7d1a0f5bd Signed-off-by: Pawel Andruszkiewicz --- diff --git a/src/filesystem/js/file_system_manager.js b/src/filesystem/js/file_system_manager.js index 05960754..8bff86e8 100755 --- a/src/filesystem/js/file_system_manager.js +++ b/src/filesystem/js/file_system_manager.js @@ -77,7 +77,7 @@ FileSystemManager.prototype.resolve = function(location, onsuccess, onerror, mod var aStatObj = native_.getResultObject(result); var _result = commonFS_.getFileInfo(aStatObj, false, args.mode); if (_result.readOnly && args.mode !== 'r') { - throw new WebAPIException(WebAPIException.IO_ERR); + native_.callIfPossible(args.onerror, new WebAPIException(WebAPIException.IO_ERR, 'File is read-only.')); } else { native_.callIfPossible(args.onsuccess, new File(_result)); }