public class CosServiceException extends CosClientException
| 限定符和类型 | 类和说明 |
|---|---|
static class |
CosServiceException.ErrorType
Indicates who is responsible (if known) for a failed request.
|
| 构造器和说明 |
|---|
CosServiceException(String errorMessage)
Constructs a new CosServiceException with the specified message.
|
CosServiceException(String errorMessage,
Exception cause)
Constructs a new CosServiceException with the specified message and exception indicating the
root cause.
|
CosServiceException(String message,
String errorResponseXml)
Constructs a new
CosServiceException with the specified message and error response xml
from Qcloud COS. |
| 限定符和类型 | 方法和说明 |
|---|---|
Map<String,String> |
getAdditionalDetails() |
String |
getErrorCode()
Returns the COS error code represented by this exception.
|
String |
getErrorMessage()
return the human-readable error message provided by the service
|
String |
getErrorResponseXml() |
CosServiceException.ErrorType |
getErrorType()
Indicates who is responsible for this exception (caller, service, or unknown).
|
String |
getMessage() |
String |
getRawResponseContent()
Typically only useful for debugging purpose if for some reason the SDK cannot parse the HTTP
response from a service
|
String |
getRequestId()
Returns the COS request ID that uniquely identifies the service request the caller made.
|
int |
getStatusCode()
Returns the HTTP status code that was returned with this service exception.
|
String |
getTraceId() |
void |
setAdditionalDetails(Map<String,String> additionalDetails) |
void |
setErrorCode(String errorCode)
Sets the COS error code represented by this exception.
|
void |
setErrorMessage(String value)
Sets the human-readable error message provided by the service.
|
void |
setErrorType(CosServiceException.ErrorType errorType)
Sets the type of error represented by this exception (sender, receiver, or unknown),
indicating if this exception was the caller's fault, or the service's fault.
|
void |
setRawResponseContent(String rawResponseContent)
Typically only useful for debugging purpose if for some reason the SDK cannot parse the HTTP
* response from a service
|
void |
setRequestId(String requestId)
Sets the COS requestId for this exception.
|
void |
setStatusCode(int statusCode)
Sets the HTTP status code that was returned with this service exception.
|
void |
setTraceId(String tranceId) |
isRetryablepublic CosServiceException(String errorMessage)
errorMessage - An error message describing what went wrong.public CosServiceException(String errorMessage, Exception cause)
errorMessage - An error message describing what went wrong.cause - The root exception that caused this exception to be thrown.public CosServiceException(String message, String errorResponseXml)
CosServiceException with the specified message and error response xml
from Qcloud COS.message - The error message describing why this exception was thrown.errorResponseXml - The original error response XML received from Qcloud COSCosServiceException(String)public void setRequestId(String requestId)
requestId - The unique identifier for the service request the caller made.public String getRequestId()
public void setErrorCode(String errorCode)
setErrorCode 在类中 CosClientExceptionerrorCode - The COS error code represented by this exception.public String getErrorCode()
getErrorCode 在类中 CosClientExceptionpublic void setErrorType(CosServiceException.ErrorType errorType)
errorType - The type of error represented by this exception (sender or receiver),
indicating if this exception was the caller's fault or the service's fault.public CosServiceException.ErrorType getErrorType()
public String getErrorMessage()
public void setErrorMessage(String value)
public void setStatusCode(int statusCode)
statusCode - The HTTP status code that was returned with this service exception.public int getStatusCode()
public String getTraceId()
public void setTraceId(String tranceId)
public String getErrorResponseXml()
public String getMessage()
getMessage 在类中 Throwablepublic String getRawResponseContent()
public void setRawResponseContent(String rawResponseContent)
rawResponseContent - The raw content of the HTTP responseCopyright © 2021. All rights reserved.