|
DarkMatter
4.1.0
|
A class representing a DarkMatter error. More...
Inherits RuntimeException.
Public Member Functions | |
| DarkMatterError () | |
| Initializes the instance with default values. | |
| DarkMatterError (int code) | |
| Initializes the instance with the given error code. More... | |
| DarkMatterError (int code, String msg) | |
| Initializes the instance with the given error code and message. More... | |
| DarkMatterError (int code, String msg, JsonObject data) | |
| Initializes the instance with the given error code, message, and data. More... | |
| DarkMatterError (int code, String msg, JsonObject data, Map< String, String > headers) | |
| Initializes the instance with the given values. More... | |
| DarkMatterError (int code, Exception ex) | |
| Initializes the instance with the given error code and Java Exception. More... | |
Static Public Member Functions | |
| static boolean | shouldRetry (int code) |
| Used to determine if a network request should be retried based on the status code. More... | |
Public Attributes | |
| int | code = 0 |
| The error code. | |
| JsonObject | data = null |
| Data associated with the error. | |
| Map< String, String > | headers = null |
| HTTP headers associated with the error. | |
A class representing a DarkMatter error.
| DarkMatterError | ( | int | code | ) |
Initializes the instance with the given error code.
| code | The error code. |
| DarkMatterError | ( | int | code, |
| String | msg | ||
| ) |
Initializes the instance with the given error code and message.
| code | The error code. |
| msg | The error message. |
| DarkMatterError | ( | int | code, |
| String | msg, | ||
| JsonObject | data | ||
| ) |
Initializes the instance with the given error code, message, and data.
| code | The error code. |
| msg | The error message. |
| data | The associated data. |
| DarkMatterError | ( | int | code, |
| String | msg, | ||
| JsonObject | data, | ||
| Map< String, String > | headers | ||
| ) |
Initializes the instance with the given values.
| code | The error code. |
| msg | The error message. |
| data | The associated data. |
| headers | The associated HTTP headers. |
| DarkMatterError | ( | int | code, |
| Exception | ex | ||
| ) |
Initializes the instance with the given error code and Java Exception.
| code | The error code. |
| ex | A Java Exception. |
|
static |
Used to determine if a network request should be retried based on the status code.
| code | The HTTP status code. |
true if the network request should be retried.