com.amazonaws.a2s
Class AmazonA2SException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by com.amazonaws.a2s.AmazonA2SException
All Implemented Interfaces:
java.io.Serializable

public class AmazonA2SException
extends java.lang.Exception

Amazon A2S Exception provides details of errors returned by Amazon A2S service

See Also:
Serialized Form

Constructor Summary
AmazonA2SException(java.lang.String message)
          Constructs AmazonA2SException with message
AmazonA2SException(java.lang.String message, int statusCode)
          Constructs AmazonA2SException with message and status code
AmazonA2SException(java.lang.String message, int statusCode, java.lang.String errorCode, java.lang.String requestId, java.lang.String xml)
          Constructs AmazonA2SException with information available from service
AmazonA2SException(java.lang.String message, java.lang.Throwable t)
          Constructs AmazonA2SException with message and wrapped exception
AmazonA2SException(java.lang.Throwable t)
          Constructs AmazonA2SException with wrapped exception
 
Method Summary
 java.lang.String getErrorCode()
          Gets error code returned by the service if available.
 java.lang.String getMessage()
          Gets error message
 java.lang.String getRequestId()
          Gets Request ID returned by the service if available.
 int getStatusCode()
          Gets status code returned by the service if available.
 java.lang.String getXML()
          Gets XML returned by the service if available.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AmazonA2SException

public AmazonA2SException(java.lang.String message)
Constructs AmazonA2SException with message

Parameters:
message - Overview of error

AmazonA2SException

public AmazonA2SException(java.lang.String message,
                          int statusCode)
Constructs AmazonA2SException with message and status code

Parameters:
message - Overview of error
statusCode - HTTP status code for error response

AmazonA2SException

public AmazonA2SException(java.lang.Throwable t)
Constructs AmazonA2SException with wrapped exception

Parameters:
t - wrapped exception

AmazonA2SException

public AmazonA2SException(java.lang.String message,
                          java.lang.Throwable t)
Constructs AmazonA2SException with message and wrapped exception

Parameters:
message - Overview of error
t - wrapped exception

AmazonA2SException

public AmazonA2SException(java.lang.String message,
                          int statusCode,
                          java.lang.String errorCode,
                          java.lang.String requestId,
                          java.lang.String xml)
Constructs AmazonA2SException with information available from service

Parameters:
message - Overview of error
statusCode - HTTP status code for error response
errorCode - Error Code returned by the service
requestId - Request ID returned by the service
xml - Compete xml found in response
Method Detail

getErrorCode

public java.lang.String getErrorCode()
Gets error code returned by the service if available.

Returns:
Error Code returned by the service

getMessage

public java.lang.String getMessage()
Gets error message

Overrides:
getMessage in class java.lang.Throwable
Returns:
Error message

getStatusCode

public int getStatusCode()
Gets status code returned by the service if available. If status code is set to -1, it means that status code was unavailable at the time exception was thrown

Returns:
status code returned by the service

getXML

public java.lang.String getXML()
Gets XML returned by the service if available.

Returns:
XML returned by the service

getRequestId

public java.lang.String getRequestId()
Gets Request ID returned by the service if available.

Returns:
Request ID returned by the service