File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
library/src/main/java/com/loopj/android/http Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -180,7 +180,7 @@ private void makeRequestWithRetries() throws IOException {
180
180
// switching between WI-FI and mobile data networks can cause a retry which then results in an UnknownHostException
181
181
// while the WI-FI is initialising. The retry logic will be invoked here, if this is NOT the first retry
182
182
// (to assist in genuine cases of unknown host) which seems better than outright failure
183
- cause = new IOException ("UnknownHostException exception: " + e .getMessage ());
183
+ cause = new IOException ("UnknownHostException exception: " + e .getMessage (), e );
184
184
retry = (executionCount > 0 ) && retryHandler .retryRequest (e , ++executionCount , context );
185
185
} catch (NullPointerException e ) {
186
186
// there's a bug in HttpClient 4.0.x that on some occasions causes
@@ -203,7 +203,7 @@ private void makeRequestWithRetries() throws IOException {
203
203
} catch (Exception e ) {
204
204
// catch anything else to ensure failure message is propagated
205
205
AsyncHttpClient .log .e ("AsyncHttpRequest" , "Unhandled exception origin cause" , e );
206
- cause = new IOException ("Unhandled exception: " + e .getMessage ());
206
+ cause = new IOException ("Unhandled exception: " + e .getMessage (), cause );
207
207
}
208
208
209
209
// cleaned up to throw IOException
You can’t perform that action at this time.
0 commit comments