Skip to content

Commit 523c674

Browse files
committed
Merge pull request koush#247 from robUx4/invalid_uri_debug
more debug about invalid URI not recognized by any middleware
2 parents 0f0cdf0 + 53b7a41 commit 523c674

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

AndroidAsync/src/com/koushikdutta/async/http/AsyncHttpClient.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,7 @@ public AsyncSocket detachSocket() {
420420
// set up the system default proxy and connect
421421
setupAndroidProxy(request);
422422

423+
final Exception unsupportedURI;
423424
synchronized (mMiddleware) {
424425
for (AsyncHttpClientMiddleware middleware: mMiddleware) {
425426
Cancellable socketCancellable = middleware.getSocket(data);
@@ -429,8 +430,9 @@ public AsyncSocket detachSocket() {
429430
return;
430431
}
431432
}
433+
unsupportedURI = new IllegalArgumentException("invalid uri="+uri+" middlewares="+mMiddleware);
432434
}
433-
reportConnectedCompleted(cancel, new IllegalArgumentException("invalid uri"), null, request, callback);
435+
reportConnectedCompleted(cancel, unsupportedURI, null, request, callback);
434436
}
435437

436438
public static abstract class RequestCallbackBase<T> implements RequestCallback<T> {

0 commit comments

Comments
 (0)