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.
|
java.lang.Throwable |
cause
Root cause.
|
int |
code
Error code.
|
java.lang.String |
message
Detailed error message.
|
Modifier and Type | Method and Description |
---|---|
static IAResult.Error |
conversionError(java.lang.Throwable cause) |
static IAResult.Error |
httpError(int errorCode,
java.lang.String message) |
static IAResult.Error |
networkError(java.lang.Throwable cause) |
java.lang.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 java.lang.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 java.lang.String message
public static IAResult.Error networkError(java.lang.Throwable cause)
public static IAResult.Error httpError(int errorCode, java.lang.String message)
public static IAResult.Error conversionError(java.lang.Throwable cause)
public java.lang.String toString()
toString
in class java.lang.Object