public class QCloudServiceException
extends java.lang.Exception
| 限定符和类型 | 字段和说明 |
|---|---|
static java.lang.String |
ERR0R_REQUEST_IS_EXPIRED |
static java.lang.String |
ERR0R_REQUEST_TIME_TOO_SKEWED |
| 构造器和说明 |
|---|
QCloudServiceException(java.lang.String errorMessage)
Constructs a new QCloudServiceException with the specified message.
|
QCloudServiceException(java.lang.String errorMessage,
java.lang.Exception cause)
Constructs a new QCloudServiceException with the specified message and
exception indicating the root cause.
|
| 限定符和类型 | 方法和说明 |
|---|---|
java.lang.String |
getErrorCode()
Returns the qcloud error code represented by this exception.
|
java.lang.String |
getErrorMessage() |
java.lang.String |
getMessage()
Returns the detail message string of this throwable.
|
java.lang.String |
getRequestId()
Returns the qcloud request ID that uniquely identifies the service request
the caller made.
|
java.lang.String |
getServiceName()
Returns the name of the service that sent this error response.
|
int |
getStatusCode()
Returns the HTTP status code that was returned with this service
exception.
|
QCloudServiceException |
setErrorCode(java.lang.String errorCode)
Sets the qcloud error code represented by this exception.
|
void |
setErrorMessage(java.lang.String errorMessage) |
void |
setRequestId(java.lang.String requestId)
Sets the qcloud requestId for this exception.
|
void |
setServiceName(java.lang.String serviceName)
Sets the name of the service that sent this error response.
|
void |
setStatusCode(int statusCode)
Sets the HTTP status code that was returned with this service exception.
|
public static final java.lang.String ERR0R_REQUEST_TIME_TOO_SKEWED
public static final java.lang.String ERR0R_REQUEST_IS_EXPIRED
public QCloudServiceException(java.lang.String errorMessage)
errorMessage - An error message describing what went wrong.public QCloudServiceException(java.lang.String errorMessage,
java.lang.Exception cause)
errorMessage - An error message describing what went wrong.cause - The root exception that caused this exception to be thrown.public void setRequestId(java.lang.String requestId)
requestId - The unique identifier for the service request the caller
made.public java.lang.String getRequestId()
public void setServiceName(java.lang.String serviceName)
serviceName - The name of the service that sent this error response.public java.lang.String getServiceName()
public QCloudServiceException setErrorCode(java.lang.String errorCode)
errorCode - The qcloud error code represented by this exception.public java.lang.String getErrorCode()
public java.lang.String getErrorMessage()
public void setStatusCode(int statusCode)
statusCode - The HTTP status code that was returned with this
service exception.public int getStatusCode()
public java.lang.String getMessage()
java.lang.ThrowablegetMessage 在类中 java.lang.ThrowableThrowable instance
(which may be null).public void setErrorMessage(java.lang.String errorMessage)
errorMessage - sets the error message.