mirror of
https://github.com/zxing/zxing.git
synced 2025-03-05 20:48:51 -08:00
I keep forgetting that you can't use the normal IOException constructor in old Android
git-svn-id: https://zxing.googlecode.com/svn/trunk@2552 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
parent
b89f3d5e35
commit
65be855649
|
@ -190,26 +190,26 @@ public final class HttpHelper {
|
|||
} catch (NullPointerException npe) {
|
||||
// this is an Android bug: http://code.google.com/p/android/issues/detail?id=16895
|
||||
Log.w(TAG, "Bad URI? " + uri);
|
||||
throw new IOException(npe);
|
||||
throw new IOException(npe.toString());
|
||||
} catch (IllegalArgumentException iae) {
|
||||
// Also seen this in the wild, not sure what to make of it. Probably a bad URL
|
||||
Log.w(TAG, "Bad URI? " + uri);
|
||||
throw new IOException(iae);
|
||||
throw new IOException(iae.toString());
|
||||
} catch (SecurityException se) {
|
||||
// due to bad VPN settings?
|
||||
Log.w(TAG, "Restricted URI? " + uri);
|
||||
throw new IOException(se);
|
||||
throw new IOException(se.toString());
|
||||
} catch (IndexOutOfBoundsException ioobe) {
|
||||
// Another Android problem? https://groups.google.com/forum/?fromgroups#!topic/google-admob-ads-sdk/U-WfmYa9or0
|
||||
Log.w(TAG, "Bad URI? " + uri);
|
||||
throw new IOException(ioobe);
|
||||
throw new IOException(ioobe.toString());
|
||||
}
|
||||
try {
|
||||
return connection.getResponseCode();
|
||||
} catch (NullPointerException npe) {
|
||||
// this is maybe this Android bug: http://code.google.com/p/android/issues/detail?id=15554
|
||||
Log.w(TAG, "Bad URI? " + uri);
|
||||
throw new IOException(npe);
|
||||
throw new IOException(npe.toString());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue