Package org.apache.sling.testing.clients
Class ClientException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- org.apache.sling.testing.clients.ClientException
-
- All Implemented Interfaces:
Serializable
public class ClientException extends Exception
An exception thrown when something went wrong with using the sling testing clients- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ClientException(String message)
ClientException(String message, int httpStatusCode)
ClientException(String message, int httpStatusCode, Throwable throwable)
ClientException(String message, Throwable throwable)
ClientException(String message, 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()
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 exceptionvoid
setResponse(SlingHttpResponse response)
Set the response associated with this exception or {{null}}String
toString()
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
-
-
-
Constructor Detail
-
ClientException
public ClientException(String message)
-
ClientException
public ClientException(String message, int httpStatusCode)
-
ClientException
public ClientException(String message, 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 String getMessage()
- Overrides:
getMessage
in classThrowable
-
-