public class BoxAPIException extends RuntimeException
Constructor and Description |
---|
BoxAPIException(String message)
Constructs a BoxAPIException with a specified message.
|
BoxAPIException(String message,
int responseCode,
String response)
Constructs a BoxAPIException with details about the server's response.
|
BoxAPIException(String message,
int responseCode,
String response,
Throwable cause)
Constructs a BoxAPIException that wraps another underlying exception with details about the server's response.
|
BoxAPIException(String message,
Throwable cause)
Constructs a BoxAPIException that wraps another underlying exception.
|
Modifier and Type | Method and Description |
---|---|
String |
getResponse()
Gets the body of the response returned by the server when this exception was thrown.
|
int |
getResponseCode()
Gets the response code returned by the server when this exception was thrown.
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public BoxAPIException(String message)
message
- a message explaining why the exception occurred.public BoxAPIException(String message, int responseCode, String response)
message
- a message explaining why the exception occurred.responseCode
- the response code returned by the Box server.response
- the response body returned by the Box server.public BoxAPIException(String message, Throwable cause)
message
- a message explaining why the exception occurred.cause
- an underlying exception.public BoxAPIException(String message, int responseCode, String response, Throwable cause)
message
- a message explaining why the exception occurred.responseCode
- the response code returned by the Box server.response
- the response body returned by the Box server.cause
- an underlying exception.public int getResponseCode()
public String getResponse()