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 {
180180                    // switching between WI-FI and mobile data networks can cause a retry which then results in an UnknownHostException 
181181                    // while the WI-FI is initialising. The retry logic will be invoked here, if this is NOT the first retry 
182182                    // (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 );
184184                    retry  = (executionCount  > 0 ) && retryHandler .retryRequest (e , ++executionCount , context );
185185                } catch  (NullPointerException  e ) {
186186                    // there's a bug in HttpClient 4.0.x that on some occasions causes 
@@ -203,7 +203,7 @@ private void makeRequestWithRetries() throws IOException {
203203        } catch  (Exception  e ) {
204204            // catch anything else to ensure failure message is propagated 
205205            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 );
207207        }
208208
209209        // cleaned up to throw IOException 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments