public class BoxException
extends java.lang.Exception
| Modifier and Type | Class and Description |
|---|---|
static class |
BoxException.CacheImplementationNotFound
Exception class that indicates a cache implementation was not set in
BoxConfig.setCache(BoxCache) |
static class |
BoxException.CacheResultUnavilable
Exception class that signifies a result was not found in the cache
|
static class |
BoxException.ErrorType |
static class |
BoxException.MaxAttemptsExceeded
An exception that indicates the RealTimeServerConnection has exceeded the recommended number of retries.
|
static class |
BoxException.RateLimitAttemptsExceeded |
static class |
BoxException.RefreshFailure |
| Constructor and Description |
|---|
BoxException(java.lang.String message)
Constructs a BoxAPIException with a specified message.
|
BoxException(java.lang.String message,
BoxHttpResponse response)
Constructs a BoxAPIException with details about the server's response.
|
BoxException(java.lang.String message,
int responseCode,
java.lang.String response,
java.lang.Throwable cause)
Constructs a BoxAPIException that wraps another underlying exception with details about the server's response.
|
BoxException(java.lang.String message,
java.lang.Throwable cause)
Constructs a BoxAPIException that wraps another underlying exception.
|
| Modifier and Type | Method and Description |
|---|---|
BoxError |
getAsBoxError()
Gets the server response as a BoxError.
|
BoxException.ErrorType |
getErrorType() |
java.lang.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.
|
public BoxException(java.lang.String message)
message - a message explaining why the exception occurred.public BoxException(java.lang.String message,
BoxHttpResponse response)
message - a message explaining why the exception occurred.response - the response body returned by the Box server.public BoxException(java.lang.String message,
java.lang.Throwable cause)
message - a message explaining why the exception occurred.cause - an underlying exception.public BoxException(java.lang.String message,
int responseCode,
java.lang.String response,
java.lang.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 java.lang.String getResponse()
public BoxError getAsBoxError()
public BoxException.ErrorType getErrorType()