public class RetrofitError extends RuntimeException
Modifier and Type | Method and Description |
---|---|
static RetrofitError |
conversionError(String url,
Response response,
Converter converter,
Type successType,
ConversionException exception) |
Object |
getBody()
HTTP response body converted to the type declared by either the interface method return type or
the generic type of the supplied
Callback parameter. |
Object |
getBodyAs(Type type)
HTTP response body converted to specified
type . |
Response |
getResponse()
Response object containing status code, headers, body, etc.
|
String |
getUrl()
The request URL which produced the error.
|
static RetrofitError |
httpError(String url,
Response response,
Converter converter,
Type successType) |
boolean |
isNetworkError()
Whether or not this error was the result of a network error.
|
static RetrofitError |
networkError(String url,
IOException exception) |
static RetrofitError |
unexpectedError(String url,
Throwable exception) |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public static RetrofitError networkError(String url, IOException exception)
public static RetrofitError conversionError(String url, Response response, Converter converter, Type successType, ConversionException exception)
public static RetrofitError httpError(String url, Response response, Converter converter, Type successType)
public static RetrofitError unexpectedError(String url, Throwable exception)
public String getUrl()
public Response getResponse()
public boolean isNetworkError()
public Object getBody()
Callback
parameter.Copyright © 2013 Square, Inc.. All Rights Reserved.