public class StandardErrorUnmarshaller extends AbstractErrorUnmarshaller<AwsServiceException,Node>
LegacyErrorUnmarshaller| Constructor and Description |
|---|
StandardErrorUnmarshaller()
Constructs a new unmarshaller that will unmarshall a standard AWS error
message as a generic SdkServiceException object.
|
StandardErrorUnmarshaller(Class<? extends AwsServiceException> exceptionClass)
Constructor allowing subclasses to specify a specific type of
SdkServiceException to instantiating when populating the exception
object with data from the error message.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getErrorPropertyPath(String property)
Returns the path to the specified property within an error response.
|
ErrorType |
getErrorType(String errorType)
Query/Xml services optionally return an string error type that can is either "Sender" or
"Receiver".
|
String |
parseErrorCode(Node in)
Returns the AWS error code for the specified error response.
|
String |
parseErrorCode(Node in,
XPath xpath) |
AwsServiceException |
standardErrorPathException(String errorCode,
Node in,
XPath xpath) |
AwsServiceException |
unmarshall(Node in) |
public StandardErrorUnmarshaller()
public StandardErrorUnmarshaller(Class<? extends AwsServiceException> exceptionClass)
exceptionClass - The class of SdkServiceException to create and populate
when unmarshalling the error message.public AwsServiceException unmarshall(Node in) throws Exception
ExceptionUnmarshaller.unmarshall(java.lang.Object)public String parseErrorCode(Node in) throws Exception
in - The DOM tree node containing the error response.Exception - If any problems were encountered pulling out the AWS error
code.public String parseErrorCode(Node in, XPath xpath) throws Exception
Exceptionpublic String getErrorPropertyPath(String property)
property - The name of the desired property.public AwsServiceException standardErrorPathException(String errorCode, Node in, XPath xpath) throws Exception
Exceptionpublic ErrorType getErrorType(String errorType)
ErrorType.SERVICE. Sender will return ErrorType.CLIENT.
All other values will return ErrorType.UNKNOWN.errorType - - String error type from returned response.ErrorTypeCopyright © 2017 Amazon Web Services, Inc. All Rights Reserved.