public class RetrofitError
extends java.lang.RuntimeException
Modifier and Type | Method and Description |
---|---|
static RetrofitError |
conversionError(java.lang.String url,
Response response,
Converter converter,
java.lang.reflect.Type successType,
ConversionException exception) |
java.lang.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. |
java.lang.Object |
getBodyAs(java.lang.reflect.Type type)
HTTP response body converted to specified
type . |
Response |
getResponse()
Response object containing status code, headers, body, etc.
|
java.lang.String |
getUrl()
The request URL which produced the error.
|
static RetrofitError |
httpError(java.lang.String url,
Response response,
Converter converter,
java.lang.reflect.Type successType) |
boolean |
isNetworkError()
Whether or not this error was the result of a network error.
|
static RetrofitError |
networkError(java.lang.String url,
java.io.IOException exception) |
static RetrofitError |
unexpectedError(java.lang.String url,
java.lang.Throwable exception) |
public static RetrofitError networkError(java.lang.String url, java.io.IOException exception)
public static RetrofitError conversionError(java.lang.String url, Response response, Converter converter, java.lang.reflect.Type successType, ConversionException exception)
public static RetrofitError httpError(java.lang.String url, Response response, Converter converter, java.lang.reflect.Type successType)
public static RetrofitError unexpectedError(java.lang.String url, java.lang.Throwable exception)
public java.lang.String getUrl()
public Response getResponse()
public boolean isNetworkError()
public java.lang.Object getBody()
Callback
parameter.public java.lang.Object getBodyAs(java.lang.reflect.Type type)
type
.Copyright © 2014 Square, Inc.. All Rights Reserved.