You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ia...@apache.org on 2014/07/14 16:56:13 UTC

git commit: CB-6781: Expose FileTransferError.exception to application

Repository: cordova-plugin-file-transfer
Updated Branches:
  refs/heads/master 7e331313f -> bdd3e2d56


CB-6781: Expose FileTransferError.exception to application


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

Branch: refs/heads/master
Commit: bdd3e2d56f2e33266667333308d38db387cdd7d8
Parents: 7e33131
Author: Ian Clelland <ic...@chromium.org>
Authored: Mon Jul 14 10:56:08 2014 -0400
Committer: Ian Clelland <ic...@chromium.org>
Committed: Mon Jul 14 10:56:08 2014 -0400

----------------------------------------------------------------------
 www/FileTransfer.js      | 4 ++--
 www/FileTransferError.js | 3 ++-
 2 files changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/blob/bdd3e2d5/www/FileTransfer.js
----------------------------------------------------------------------
diff --git a/www/FileTransfer.js b/www/FileTransfer.js
index d842c5a..4668a3c 100644
--- a/www/FileTransfer.js
+++ b/www/FileTransfer.js
@@ -125,7 +125,7 @@ FileTransfer.prototype.upload = function(filePath, server, successCallback, erro
     }
 
     var fail = errorCallback && function(e) {
-        var error = new FileTransferError(e.code, e.source, e.target, e.http_status, e.body);
+        var error = new FileTransferError(e.code, e.source, e.target, e.http_status, e.body, e.exception);
         errorCallback(error);
     };
 
@@ -191,7 +191,7 @@ FileTransfer.prototype.download = function(source, target, successCallback, erro
     };
 
     var fail = errorCallback && function(e) {
-        var error = new FileTransferError(e.code, e.source, e.target, e.http_status, e.body);
+        var error = new FileTransferError(e.code, e.source, e.target, e.http_status, e.body, e.exception);
         errorCallback(error);
     };
 

http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/blob/bdd3e2d5/www/FileTransferError.js
----------------------------------------------------------------------
diff --git a/www/FileTransferError.js b/www/FileTransferError.js
index 7121882..07ca831 100644
--- a/www/FileTransferError.js
+++ b/www/FileTransferError.js
@@ -23,12 +23,13 @@
  * FileTransferError
  * @constructor
  */
-var FileTransferError = function(code, source, target, status, body) {
+var FileTransferError = function(code, source, target, status, body, exception) {
     this.code = code || null;
     this.source = source || null;
     this.target = target || null;
     this.http_status = status || null;
     this.body = body || null;
+    this.exception = exception || null;
 };
 
 FileTransferError.FILE_NOT_FOUND_ERR = 1;