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 2013/08/20 00:01:58 UTC
[04/10] git commit: Fix NPE in mobile-spec Upload of an unknown host
test.
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/a8301168
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/tree/a8301168
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/diff/a8301168
Branch: refs/heads/master
Commit: a83011685dc13e136685dda9fc5e77088f2afe70
Parents: d50689c
Author: Andrew Grieve <ag...@chromium.org>
Authored: Tue Jul 30 11:35:09 2013 -0400
Committer: Steven Gill <st...@gmail.com>
Committed: Wed Aug 14 15:33:18 2013 -0700
----------------------------------------------------------------------
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/a8301168/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);
}
}