Package com.amazonaws.services.s3.model
Class AmazonS3Exception
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- com.amazonaws.AmazonClientException
-
- com.amazonaws.AmazonServiceException
-
- com.amazonaws.services.s3.model.AmazonS3Exception
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
MultiObjectDeleteException
public class AmazonS3Exception extends AmazonServiceException implements Serializable
Provides an extension of the AmazonServiceException for errors reported by Amazon S3 while processing a request. In particular, this class provides access to Amazon S3's extended request ID. This ID is required debugging information in the case the user needs to contact Amazon about an issue where Amazon S3 is incorrectly handling a request.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.amazonaws.AmazonServiceException
AmazonServiceException.ErrorType
-
-
Constructor Summary
Constructors Constructor Description AmazonS3Exception(String message)
Constructs a newAmazonS3Exception
with the specified message.AmazonS3Exception(String message, Exception cause)
Constructs a newAmazonS3Exception
with the specified message and root cause.AmazonS3Exception(String message, String errorResponseXml)
Constructs a newAmazonS3Exception
with the specified message and error response xml from Amazon S3.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,String>
getAdditionalDetails()
Returns any additional information retrieved in the error response.String
getCloudFrontId()
Gets Amazon S3's CloudFront ID when the request is performed in the accelerate mode.String
getErrorResponseXml()
Returns the error XML received in the HTTP Response or null if the exception is constructed from the headers.String
getExtendedRequestId()
Gets Amazon S3's extended request ID.void
setAdditionalDetails(Map<String,String> additionalDetails)
Sets additional information about the error response.void
setCloudFrontId(String cloudFrontId)
Sets Amazon S3's CloudFront ID.void
setExtendedRequestId(String extendedRequestId)
Sets Amazon S3's extended request ID.String
toString()
Extends the implementation from AmazonServiceException to include additional information on S3's extended request ID.-
Methods inherited from class com.amazonaws.AmazonServiceException
getErrorCode, getErrorMessage, getErrorType, getMessage, getRawResponse, getRawResponseContent, getRequestId, getServiceName, getStatusCode, setErrorCode, setErrorMessage, setErrorType, setRawResponse, setRawResponseContent, setRequestId, setServiceName, setStatusCode
-
Methods inherited from class com.amazonaws.AmazonClientException
isRetryable
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
-
-
-
Constructor Detail
-
AmazonS3Exception
public AmazonS3Exception(String message)
Constructs a newAmazonS3Exception
with the specified message.- Parameters:
message
- The error message describing why this exception was thrown.- See Also:
AmazonS3Exception(String, Exception)
-
AmazonS3Exception
public AmazonS3Exception(String message, Exception cause)
Constructs a newAmazonS3Exception
with the specified message and root cause.- Parameters:
message
- The error message describing why this exception was thrown.cause
- The root exception that caused this exception to be thrown.- See Also:
AmazonS3Exception(String)
-
AmazonS3Exception
public AmazonS3Exception(String message, String errorResponseXml)
Constructs a newAmazonS3Exception
with the specified message and error response xml from Amazon S3.- Parameters:
message
- The error message describing why this exception was thrown.errorResponseXml
- The original error response XML received from Amazon S3- See Also:
AmazonS3Exception(String)
-
-
Method Detail
-
getExtendedRequestId
public String getExtendedRequestId()
Gets Amazon S3's extended request ID. This ID is required debugging information in the case the user needs to contact Amazon about an issue where Amazon S3 is incorrectly handling a request.- Returns:
- Amazon S3's extended request ID.
- See Also:
setExtendedRequestId(String)
-
setExtendedRequestId
public void setExtendedRequestId(String extendedRequestId)
Sets Amazon S3's extended request ID.- Parameters:
extendedRequestId
- S3's extended request ID.- See Also:
getExtendedRequestId()
-
getCloudFrontId
public String getCloudFrontId()
Gets Amazon S3's CloudFront ID when the request is performed in the accelerate mode.- Returns:
- Amazon S3's CloudFront ID in response from the accelerate endpoint.
- See Also:
setCloudFrontId(String)
-
setCloudFrontId
public void setCloudFrontId(String cloudFrontId)
Sets Amazon S3's CloudFront ID.- Parameters:
cloudFrontId
- Amazon S3's CloudFront ID in response from the accelerate endpoint.
-
getAdditionalDetails
public Map<String,String> getAdditionalDetails()
Returns any additional information retrieved in the error response.
-
setAdditionalDetails
public void setAdditionalDetails(Map<String,String> additionalDetails)
Sets additional information about the error response.
-
toString
public String toString()
Extends the implementation from AmazonServiceException to include additional information on S3's extended request ID.
-
getErrorResponseXml
public String getErrorResponseXml()
Returns the error XML received in the HTTP Response or null if the exception is constructed from the headers.
-
-