what-the-bank/sources/okhttp3/repackaged/internal/http/RouteException.java

46 lines
1.2 KiB
Java

package okhttp3.repackaged.internal.http;
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
/* loaded from: classes6.dex */
public final class RouteException extends Exception {
private static final Method amu;
private IOException amv;
static {
Method method;
try {
method = Throwable.class.getDeclaredMethod("addSuppressed", Throwable.class);
} catch (Exception unused) {
method = null;
}
amu = method;
}
public RouteException(IOException iOException) {
super(iOException);
this.amv = iOException;
}
public final void addConnectException(IOException iOException) {
a(iOException, this.amv);
this.amv = iOException;
}
private void a(IOException iOException, IOException iOException2) {
Method method = amu;
if (method != null) {
try {
method.invoke(iOException, iOException2);
} catch (IllegalAccessException | InvocationTargetException unused) {
}
}
}
public final IOException getLastConnectException() {
return this.amv;
}
}