You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ag...@apache.org on 2013/07/30 17:35:43 UTC
git commit: Fix NPE in mobile-spec Upload of an unknown host test.
Updated Branches:
refs/heads/dev f71dba431 -> d26fc598e
Fix NPE in mobile-spec Upload of an unknown host test.
Was happening over cell connection.
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/d26fc598
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/tree/d26fc598
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/diff/d26fc598
Branch: refs/heads/dev
Commit: d26fc598e263dfb374b79cefd78c43b3c0dd218b
Parents: f71dba4
Author: Andrew Grieve <ag...@chromium.org>
Authored: Tue Jul 30 11:35:09 2013 -0400
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Tue Jul 30 11:35:09 2013 -0400
----------------------------------------------------------------------
src/android/FileTransfer.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/blob/d26fc598/src/android/FileTransfer.java
----------------------------------------------------------------------
diff --git a/src/android/FileTransfer.java b/src/android/FileTransfer.java
index c4b5dd1..f324482 100644
--- a/src/android/FileTransfer.java
+++ b/src/android/FileTransfer.java
@@ -595,7 +595,8 @@ public class FileTransfer extends CordovaPlugin {
body = bodyBuilder.toString();
}
}
- } catch (IOException e) {
+ // IOException can leave connection object in a bad state, so catch all exceptions.
+ } catch (Throwable e) {
Log.w(LOG_TAG, "Error getting HTTP status code from connection.", e);
}
}