Initial import of ADIF API reverse-engineering toolkit
This commit is contained in:
34
apk_decompiled/sources/retrofit2/HttpException.java
Normal file
34
apk_decompiled/sources/retrofit2/HttpException.java
Normal file
@@ -0,0 +1,34 @@
|
||||
package retrofit2;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/* loaded from: classes3.dex */
|
||||
public class HttpException extends RuntimeException {
|
||||
private final int code;
|
||||
private final String message;
|
||||
private final transient Response<?> response;
|
||||
|
||||
public HttpException(Response<?> response) {
|
||||
super(getMessage(response));
|
||||
this.code = response.code();
|
||||
this.message = response.message();
|
||||
this.response = response;
|
||||
}
|
||||
|
||||
private static String getMessage(Response<?> response) {
|
||||
Objects.requireNonNull(response, "response == null");
|
||||
return "HTTP " + response.code() + " " + response.message();
|
||||
}
|
||||
|
||||
public int code() {
|
||||
return this.code;
|
||||
}
|
||||
|
||||
public String message() {
|
||||
return this.message;
|
||||
}
|
||||
|
||||
public Response<?> response() {
|
||||
return this.response;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user