public class CloudAPIException
extends java.lang.RuntimeException
implements java.io.Serializable
Modifier and Type | Class and Description |
---|---|
static class |
CloudAPIException.ErrorCode
The ErrorCode enum.
|
Constructor and Description |
---|
CloudAPIException(CloudAPIException.ErrorCode code)
Instantiates a new SDK exception.
|
CloudAPIException(CloudAPIException.ErrorCode defaultCode,
java.lang.Exception exception)
Instantiates a new SDK exception with a root cause exception.
|
CloudAPIException(CloudAPIException.ErrorCode code,
int httpCode)
Instantiates a new SDK exception with an error code and a HTTP status code.
|
CloudAPIException(CloudAPIException.ErrorCode code,
int httpCode,
int serverCode,
java.lang.String message)
Instantiates a new SDK exception with an error code, an HTTP status code, a server error code, and an error message.
|
CloudAPIException(CloudAPIException.ErrorCode code,
int httpCode,
java.lang.String message)
Instantiates a new SDK exception with an error code and an error message.
|
CloudAPIException(CloudAPIException.ErrorCode code,
int httpCode,
java.lang.String serverCode,
java.lang.String message)
Instantiates a new SDK exception with an error code, an HTTP status code, a server error code, and an error message.
|
CloudAPIException(CloudAPIException.ErrorCode code,
java.lang.String message)
Instantiates a new SDK exception with an error code and an error message.
|
CloudAPIException(java.lang.Exception exception)
Instantiates a new SDK exception with a root cause exception.
|
Modifier and Type | Method and Description |
---|---|
void |
addToMessage(java.lang.String mes)
Adds the to message.
|
CloudAPIException.ErrorCode |
getCode()
Gets the error code.
|
java.lang.Exception |
getException()
Gets the root cause exception.
|
int |
getHttpCode()
Gets the HTTP status code.
|
java.lang.String |
getMessage()
Gets an error message.
|
java.lang.String |
getServerCode()
Gets the root cause error code returned by the Cloud API server.
|
public CloudAPIException(CloudAPIException.ErrorCode code)
code
- The codepublic CloudAPIException(CloudAPIException.ErrorCode code, int httpCode)
code
- The error codehttpCode
- The HTTP codepublic CloudAPIException(CloudAPIException.ErrorCode code, java.lang.String message)
code
- The error codemessage
- The error messagepublic CloudAPIException(CloudAPIException.ErrorCode code, int httpCode, java.lang.String message)
code
- The error codehttpCode
- The HTTP codemessage
- The error messagepublic CloudAPIException(CloudAPIException.ErrorCode code, int httpCode, int serverCode, java.lang.String message)
code
- The error codehttpCode
- The HTTP codeserverCode
- The server error codemessage
- The error messagepublic CloudAPIException(CloudAPIException.ErrorCode code, int httpCode, java.lang.String serverCode, java.lang.String message)
code
- The error codehttpCode
- The HTTP codeserverCode
- The server error codemessage
- The error messagepublic CloudAPIException(CloudAPIException.ErrorCode defaultCode, java.lang.Exception exception)
defaultCode
- A default error codeexception
- The root cause exceptionpublic CloudAPIException(java.lang.Exception exception)
exception
- The root cause exceptionpublic java.lang.String getMessage()
getMessage
in class java.lang.Throwable
Throwable.getMessage()
public void addToMessage(java.lang.String mes)
mes
- the mespublic CloudAPIException.ErrorCode getCode()
public int getHttpCode()
public java.lang.Exception getException()
public java.lang.String getServerCode()