Class ClientException

  • All Implemented Interfaces:
    java.io.Serializable

    public class ClientException
    extends java.lang.Exception
    An exception thrown when something went wrong with using the sling testing clients
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      ClientException​(java.lang.String message)  
      ClientException​(java.lang.String message, int httpStatusCode)  
      ClientException​(java.lang.String message, int httpStatusCode, java.lang.Throwable throwable)  
      ClientException​(java.lang.String message, java.lang.Throwable throwable)  
      ClientException​(java.lang.String message, java.lang.Throwable throwable, org.apache.http.client.methods.HttpUriRequest request, SlingHttpResponse response)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getHttpStatusCode()  
      java.lang.String getMessage()  
      org.apache.http.client.methods.HttpUriRequest getRequest()  
      SlingHttpResponse getResponse()  
      void setRequest​(org.apache.http.client.methods.HttpUriRequest request)
      Set the request associated with this exception
      void setResponse​(SlingHttpResponse response)
      Set the response associated with this exception or {{null}}
      java.lang.String toString()  
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • ClientException

        public ClientException​(java.lang.String message)
      • ClientException

        public ClientException​(java.lang.String message,
                               java.lang.Throwable throwable)
      • ClientException

        public ClientException​(java.lang.String message,
                               int httpStatusCode)
      • ClientException

        public ClientException​(java.lang.String message,
                               int httpStatusCode,
                               java.lang.Throwable throwable)
      • ClientException

        public ClientException​(java.lang.String message,
                               java.lang.Throwable throwable,
                               org.apache.http.client.methods.HttpUriRequest request,
                               SlingHttpResponse response)
    • Method Detail

      • getRequest

        public org.apache.http.client.methods.HttpUriRequest getRequest()
        Returns:
        The request associated with this exception or {{null}}
      • setRequest

        public void setRequest​(org.apache.http.client.methods.HttpUriRequest request)
        Set the request associated with this exception
        Parameters:
        request -
      • getResponse

        public SlingHttpResponse getResponse()
        Returns:
        The response associated with this exception or {{null}}
      • setResponse

        public void setResponse​(SlingHttpResponse response)
        Set the response associated with this exception or {{null}}
        Parameters:
        response -
      • getHttpStatusCode

        public int getHttpStatusCode()
        Returns:
        the httpStatusCode
      • getMessage

        public java.lang.String getMessage()
        Overrides:
        getMessage in class java.lang.Throwable
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Throwable