public class RequestError
extends java.lang.Exception
RequestError
extends Exception
to implement an object that can be used to store
information about errors.Modifier and Type | Field and Description |
---|---|
protected java.lang.Throwable |
mCause |
protected HttpHeaders |
mHeaders |
protected java.lang.String |
mMessage |
protected long |
mNetworkTime |
protected int |
mStatusCode |
Constructor and Description |
---|
RequestError() |
Modifier and Type | Method and Description |
---|---|
java.lang.Throwable |
getCause()
Gets the actual
Throwable causing the error. |
HttpHeaders |
getHeaders()
Gets the HTTP headers.
|
java.lang.String |
getMessage()
Gets the error message.
|
long |
getNetworkTime()
Gets the network time of the error.
|
int |
getStatusCode()
Gets the HTTP status code of the error response.
|
void |
setCause(java.lang.Throwable cause)
Sets the actual
Throwable causing the error. |
void |
setHeaders(java.util.Map<java.lang.String,java.lang.String> headers)
Sets the HTTP headers.
|
void |
setMessage(java.lang.String message)
Sets the error message.
|
void |
setNetworkTime(long networkTime)
Sets the network time of the error.
|
void |
setStatusCode(int statusCode)
Sets the HTTP status code of the error response.
|
protected java.lang.Throwable mCause
protected HttpHeaders mHeaders
protected java.lang.String mMessage
protected long mNetworkTime
protected int mStatusCode
public final java.lang.Throwable getCause()
Throwable
causing the error.getCause
in class java.lang.Throwable
Throwable
public void setCause(java.lang.Throwable cause)
Throwable
causing the error.cause
- A Throwable
.public final HttpHeaders getHeaders()
HttpHeaders
.public void setHeaders(java.util.Map<java.lang.String,java.lang.String> headers)
headers
- A Map
containing headers.public final java.lang.String getMessage()
getMessage
in class java.lang.Throwable
String
.public void setMessage(java.lang.String message)
message
- The message as a String
.public final long getNetworkTime()
long
.public void setNetworkTime(long networkTime)
networkTime
- The network time as a long
.public final int getStatusCode()
int
.public void setStatusCode(int statusCode)
statusCode
- The HTTP status code as an int
.