public class MwsException extends RuntimeException
| Modifier and Type | Class and Description |
|---|---|
protected static class |
MwsException.XmlMwsException
Used to read MWSException from XML since MWSException cannot extend AbstractMwsObject.
|
| Constructor and Description |
|---|
MwsException(int statusCode,
String message,
String errorCode,
String errorType,
String xml,
MwsResponseHeaderMetadata rhmd)
Initializes MwsException with information available from service.
|
MwsException(int statusCode,
String message,
Throwable cause)
Initialize and set cause from another exception.
|
MwsException(Throwable cause)
Create wrap around another MwsException.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getDetail()
The error detail information.
|
String |
getErrorCode()
Gets error code returned by the service if available.
|
String |
getErrorType()
Gets error type returned by the service if available.
|
String |
getMessage() |
String |
getRequestId()
Get the request id from the response header metadata.
|
MwsResponseHeaderMetadata |
getResponseHeaderMetadata()
Get the response header metadata.
|
int |
getStatusCode()
Gets status code returned by the service if available.
|
String |
getTimestamp()
Get the timestamp from the response header metadata.
|
String |
getXML()
Gets XML returned by the service if available.
|
protected void |
setResponseHeaderMetadata(MwsResponseHeaderMetadata rhmd)
Set the response header metadata.
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringpublic MwsException(int statusCode,
String message,
String errorCode,
String errorType,
String xml,
MwsResponseHeaderMetadata rhmd)
statusCode - HTTP status code for error response.message - Error message from HTTP header.errorCode - Error code from response XML.errorType - Error type from response XML.xml - Compete XML found in response.rhmd - The response header metadata.public MwsException(int statusCode,
String message,
Throwable cause)
If cause is an MwsException copies that exception's attributes to this one, ignoring the statusCode and message parameters that were passed in.
statusCode - message - cause - public MwsException(Throwable cause)
cause - Exception to wrapprotected void setResponseHeaderMetadata(MwsResponseHeaderMetadata rhmd)
rhmd - public String getDetail()
public String getErrorCode()
public String getErrorType()
public String getMessage()
getMessage in class Throwablepublic String getRequestId()
public MwsResponseHeaderMetadata getResponseHeaderMetadata()
public int getStatusCode()
public String getTimestamp()
public String getXML()
Copyright © 2014. All Rights Reserved.