incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fil...@apache.org
Subject [25/35] git commit: cast File error to proper object
Date Thu, 23 Feb 2012 17:53:19 GMT
cast File error to proper object


Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/commit/a022afa5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/tree/a022afa5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/diff/a022afa5

Branch: refs/heads/ios
Commit: a022afa55a389b808d6bf05c820a016d59dc9800
Parents: 9cf624a
Author: Fil Maj <filip.maj@nitobi.com>
Authored: Thu Feb 16 17:30:42 2012 -0800
Committer: Fil Maj <filip.maj@nitobi.com>
Committed: Thu Feb 16 17:30:42 2012 -0800

----------------------------------------------------------------------
 lib/plugin/FileEntry.js |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/a022afa5/lib/plugin/FileEntry.js
----------------------------------------------------------------------
diff --git a/lib/plugin/FileEntry.js b/lib/plugin/FileEntry.js
index 4bce002..c8aaded 100644
--- a/lib/plugin/FileEntry.js
+++ b/lib/plugin/FileEntry.js
@@ -53,7 +53,10 @@ FileEntry.prototype.file = function(successCallback, errorCallback) {
         var file = new File(f.name, f.fullPath, f.type, f.lastModifiedDate, f.size);
         successCallback(file);
     };
-    exec(win, errorCallback, "File", "getFileMetadata", [this.fullPath]);
+    var fail = function(e) {
+        errorCallback(new FileError(e));
+    };
+    exec(win, fail, "File", "getFileMetadata", [this.fullPath]);
 };
 
 


Mime
View raw message