com.createsend.util.exceptions
Class CreateSendHttpException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by com.createsend.util.exceptions.CreateSendException
              extended by com.createsend.util.exceptions.CreateSendHttpException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
BadRequestException, NotFoundException, ServerErrorException, UnauthorisedException

public class CreateSendHttpException
extends CreateSendException

An exception raised on any HTTP based error. i.e Status code >= 400

See Also:
Serialized Form

Constructor Summary
CreateSendHttpException(com.sun.jersey.api.client.ClientResponse.Status httpStatusCode)
           
CreateSendHttpException(java.lang.String message, int httpStatusCode, int apiErrorCode, java.lang.String apiErrorMessage)
           
 
Method Summary
 int getApiErrorCode()
           
 java.lang.String getApiErrorMessage()
           
 com.sun.jersey.api.client.ClientResponse.Status getHttpStatusCode()
           
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, 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

CreateSendHttpException

public CreateSendHttpException(com.sun.jersey.api.client.ClientResponse.Status httpStatusCode)

CreateSendHttpException

public CreateSendHttpException(java.lang.String message,
                               int httpStatusCode,
                               int apiErrorCode,
                               java.lang.String apiErrorMessage)
Method Detail

getHttpStatusCode

public com.sun.jersey.api.client.ClientResponse.Status getHttpStatusCode()
Returns:
The HTTP Status code from the failed request

getApiErrorMessage

public java.lang.String getApiErrorMessage()
Returns:
The API Error message from the failed request.

getApiErrorCode

public int getApiErrorCode()
Returns:
The API Error Code from the failed request.