public final class RestCallException extends HttpException
Constructor and Description |
---|
RestCallException(RestResponse response,
Throwable cause,
String message,
Object... args)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
<T extends Throwable> |
getCause(Class<T> c)
Similar to
Throwable.getCause() but searches until it finds the throwable of the specified type. |
RestResponse |
getResponse()
Returns the HTTP response object that caused this exception.
|
int |
getResponseCode()
Returns the HTTP response status code.
|
String |
getServerExceptionMessage()
Returns the value of the
|
String |
getServerExceptionName()
Returns the value of the
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public RestCallException(RestResponse response, Throwable cause, String message, Object... args)
response
- The HTTP response. Can be cause
- The cause of this exception.message
- The MessageFormat
-style message.args
- Optional MessageFormat
-style arguments.public String getServerExceptionName()
public String getServerExceptionMessage()
public RestResponse getResponse()
public int getResponseCode()
public <T extends Throwable> T getCause(Class<T> c)
Throwable.getCause()
but searches until it finds the throwable of the specified type.T
- The throwable type.c
- The throwable type.Copyright © 2016–2020 The Apache Software Foundation. All rights reserved.