blob: e7a57379c58ed528bf748309516475035196b6f3 (
plain)
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
|
package com.mapbox.mapboxsdk.offline;
import android.support.annotation.StringDef;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
/**
* An Offline Region error
*/
public class OfflineRegionError {
/**
* Error code, as a string, self-explanatory.
*/
@StringDef({REASON_SUCCESS, REASON_NOT_FOUND, REASON_SERVER, REASON_CONNECTION, REASON_OTHER})
@Retention(RetentionPolicy.SOURCE)
public @interface ErrorReason {}
public static final String REASON_SUCCESS = "REASON_SUCCESS";
public static final String REASON_NOT_FOUND = "REASON_NOT_FOUND";
public static final String REASON_SERVER = "REASON_SERVER";
public static final String REASON_CONNECTION = "REASON_CONNECTION";
public static final String REASON_OTHER = "REASON_OTHER";
private @ErrorReason String reason;
/**
/* An error message from the request handler, e.g. a server message or a system message
/* informing the user about the reason for the failure.
*/
private String message;
/*
* Constructors
*/
private OfflineRegionError() {
// For JNI use only
}
/*
* Getters
*/
public @ErrorReason String getReason() {
return reason;
}
public String getMessage() {
return message;
}
}
|