You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by st...@apache.org on 2016/09/07 22:00:38 UTC

cordova-plugin-file git commit: Add handling for SecurityException

Repository: cordova-plugin-file
Updated Branches:
  refs/heads/master 9860bbb85 -> 9ad67e69c


Add handling for SecurityException

 This closes #142


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/commit/9ad67e69
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/tree/9ad67e69
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/diff/9ad67e69

Branch: refs/heads/master
Commit: 9ad67e69c7e601b8330fed3e093c8657ab45be35
Parents: 9860bbb
Author: Connor Pearson <cj...@gmail.com>
Authored: Tue Oct 27 08:33:03 2015 -0400
Committer: Steve Gill <st...@gmail.com>
Committed: Wed Sep 7 15:00:29 2016 -0700

----------------------------------------------------------------------
 src/android/FileUtils.java | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-file/blob/9ad67e69/src/android/FileUtils.java
----------------------------------------------------------------------
diff --git a/src/android/FileUtils.java b/src/android/FileUtils.java
index fc52d18..2b88d52 100644
--- a/src/android/FileUtils.java
+++ b/src/android/FileUtils.java
@@ -682,6 +682,8 @@ public class FileUtils extends CordovaPlugin {
                         callbackContext.error(FileUtils.TYPE_MISMATCH_ERR);
                     } else if(e instanceof JSONException ) {
                         callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.JSON_EXCEPTION));
+                    } else if (e instanceof SecurityException) {
+                        callbackContext.error(FileUtils.SECURITY_ERR);
                     } else {
                         e.printStackTrace();
                     	callbackContext.error(FileUtils.UNKNOWN_ERR);


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org