public class RestException extends RuntimeException
Constructor and Description |
---|
RestException(String message,
retrofit2.Response<okhttp3.ResponseBody> response)
Initializes a new instance of the RestException class.
|
RestException(String message,
retrofit2.Response<okhttp3.ResponseBody> response,
Object body)
Initializes a new instance of the RestException class.
|
Modifier and Type | Method and Description |
---|---|
Object |
body() |
retrofit2.Response<okhttp3.ResponseBody> |
response() |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public RestException(String message, retrofit2.Response<okhttp3.ResponseBody> response)
message
- the exception message or the response content if a message is not availableresponse
- the HTTP responsepublic RestException(String message, retrofit2.Response<okhttp3.ResponseBody> response, Object body)
message
- the exception message or the response content if a message is not availableresponse
- the HTTP responsebody
- the deserialized response bodypublic retrofit2.Response<okhttp3.ResponseBody> response()
public Object body()
Copyright © 2019. All rights reserved.