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); }; 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;