HttpException.smali
.class public Lretrofit2/HttpException;
.super Ljava/lang/RuntimeException;
.source "HttpException.java"
# instance fields
.field private final code:I
.field private final message:Ljava/lang/String;
.field private final transient response:Lretrofit2/Response;
.annotation system Ldalvik/annotation/Signature;
value = {
"Lretrofit2/Response<",
"*>;"
}
.end annotation
.end field
# direct methods
.method static constructor <clinit>()V
.registers 1
return-void
.end method
.method public constructor <init>(Lretrofit2/Response;)V
.registers 3
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lretrofit2/Response<",
"*>;)V"
}
.end annotation
.line 32
.local p1, "response":Lretrofit2/Response;, "Lretrofit2/Response<*>;"
invoke-static {p1}, Lretrofit2/HttpException;->getMessage(Lretrofit2/Response;)Ljava/lang/String;
move-result-object v0
invoke-direct {p0, v0}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;)V
.line 33
invoke-virtual {p1}, Lretrofit2/Response;->code()I
move-result v0
iput v0, p0, Lretrofit2/HttpException;->code:I
.line 34
invoke-virtual {p1}, Lretrofit2/Response;->message()Ljava/lang/String;
move-result-object v0
iput-object v0, p0, Lretrofit2/HttpException;->message:Ljava/lang/String;
.line 35
iput-object p1, p0, Lretrofit2/HttpException;->response:Lretrofit2/Response;
.line 36
return-void
.end method
.method private static getMessage(Lretrofit2/Response;)Ljava/lang/String;
.registers 3
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lretrofit2/Response<",
"*>;)",
"Ljava/lang/String;"
}
.end annotation
.line 23
.local p0, "response":Lretrofit2/Response;, "Lretrofit2/Response<*>;"
const-string v0, "response == null"
invoke-static {p0, v0}, Lretrofit2/Utils;->checkNotNull(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;
.line 24
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
const-string v1, "HTTP "
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {p0}, Lretrofit2/Response;->code()I
move-result v1
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
const-string v1, " "
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {p0}, Lretrofit2/Response;->message()Ljava/lang/String;
move-result-object v1
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
return-object v0
.end method
# virtual methods
.method public code()I
.registers 2
.line 40
iget v0, p0, Lretrofit2/HttpException;->code:I
return v0
.end method
.method public message()Ljava/lang/String;
.registers 2
.line 45
iget-object v0, p0, Lretrofit2/HttpException;->message:Ljava/lang/String;
return-object v0
.end method
.method public response()Lretrofit2/Response;
.registers 2
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Lretrofit2/Response<",
"*>;"
}
.end annotation
.line 52
iget-object v0, p0, Lretrofit2/HttpException;->response:Lretrofit2/Response;
return-object v0
.end method