forked from ringcentral/pubnub-jtools
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPubNubException.java
More file actions
51 lines (44 loc) · 1.26 KB
/
Copy pathPubNubException.java
File metadata and controls
51 lines (44 loc) · 1.26 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
package com.pubnub.api;
import com.google.gson.JsonElement;
import lombok.AccessLevel;
import lombok.Builder;
import lombok.Getter;
import lombok.ToString;
import retrofit2.Call;
@Getter
@ToString
public class PubNubException extends Exception {
private String errormsg;
private PubNubError pubnubError;
private JsonElement jso;
private String response;
private int statusCode;
@Builder
public PubNubException(final String errormsg,
final PubNubError pubnubError,
final JsonElement jso,
final String response,
final int statusCode,
final Call affectedCall,
final Throwable cause) {
super(cause);
this.errormsg = errormsg;
this.pubnubError = pubnubError;
this.jso = jso;
this.response = response;
this.statusCode = statusCode;
this.affectedCall = affectedCall;
}
@Override
@ToString.Include
public Throwable getCause() {
return super.getCause();
}
@Override
public String getMessage() {
return errormsg;
}
@Getter(AccessLevel.NONE)
@ToString.Exclude
private Call affectedCall;
}