HttpException.smali
3.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
.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 public constructor <init>(Lretrofit2/Response;)V
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lretrofit2/Response<",
"*>;)V"
}
.end annotation
.line 32
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;
return-void
.end method
.method private static getMessage(Lretrofit2/Response;)Ljava/lang/String;
.locals 2
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lretrofit2/Response<",
"*>;)",
"Ljava/lang/String;"
}
.end annotation
const-string v0, "response == null"
.line 23
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 p0
invoke-virtual {v0, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p0
return-object p0
.end method
# virtual methods
.method public code()I
.locals 1
.line 40
iget v0, p0, Lretrofit2/HttpException;->code:I
return v0
.end method
.method public message()Ljava/lang/String;
.locals 1
.line 45
iget-object v0, p0, Lretrofit2/HttpException;->message:Ljava/lang/String;
return-object v0
.end method
.method public response()Lretrofit2/Response;
.locals 1
.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