Modifier and Type | Class and Description |
---|---|
static class |
IAResult.Error.Category |
Modifier and Type | Field and Description |
---|---|
IAResult.Error.Category |
category
Non-null category of the error.
|
Throwable |
cause
Root cause.
|
int |
code
Error code.
|
String |
message
Detailed error message.
|
Modifier and Type | Method and Description |
---|---|
static IAResult.Error |
conversionError(Throwable cause) |
static IAResult.Error |
httpError(int errorCode,
String message) |
static IAResult.Error |
networkError(Throwable cause) |
String |
toString() |
public final int code
category
is IAResult.Error.Category.HTTP
this fields holds the HTTP
status code, else it is -1
.public final Throwable cause
category
is IAResult.Error.Category.CONVERSION
or IAResult.Error.Category.NETWORK
and null for IAResult.Error.Category.HTTP
.public final IAResult.Error.Category category
public final String message
public static IAResult.Error networkError(Throwable cause)
public static IAResult.Error httpError(int errorCode, String message)
public static IAResult.Error conversionError(Throwable cause)