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
- Direct Known Subclasses:
TestingIOException
,TestingSetupException
,TestingValidationException
An exception thrown when something went wrong with using the sling testing clients.
This class will be turned into an abstract class eventually, so do use the specialized
sub-classes instead:
- TestingIOException to indicate network and IO problems
- TestingValidationException to indicate a mismatch between expectation and result
- TestingSetupException to indicate problems in the test setup (incorrect parameters etc)
- See Also:
-
Constructor Summary
ConstructorDescriptionClientException
(String message) Deprecated.use a constructor of one of the subclassesClientException
(String message, int httpStatusCode) Deprecated.use a constructor of one of the subclassesClientException
(String message, int httpStatusCode, Throwable throwable) Deprecated.use a constructor of one of the subclassesClientException
(String message, Throwable throwable) Deprecated.use a constructor of one of the subclassesClientException
(String message, Throwable throwable, org.apache.http.client.methods.HttpUriRequest request, SlingHttpResponse response) Deprecated.use a constructor of one of the subclasses -
Method Summary
Modifier and TypeMethodDescriptionint
org.apache.http.client.methods.HttpUriRequest
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}}toString()
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
Constructor Details
-
ClientException
Deprecated.use a constructor of one of the subclasses- Parameters:
message
- message
-
ClientException
Deprecated.use a constructor of one of the subclasses- Parameters:
message
- messagethrowable
- a throwable
-
ClientException
Deprecated.use a constructor of one of the subclasses- Parameters:
message
- messagehttpStatusCode
- statuscode
-
ClientException
Deprecated.use a constructor of one of the subclasses- Parameters:
message
- messagehttpStatusCode
- statuscodethrowable
- throwable
-
ClientException
@Deprecated public ClientException(String message, Throwable throwable, org.apache.http.client.methods.HttpUriRequest request, SlingHttpResponse response) Deprecated.use a constructor of one of the subclasses- Parameters:
message
- messagethrowable
- throwablerequest
- requestresponse
- response
-
-
Method Details
-
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
- request
-
getResponse
- Returns:
- The response associated with this exception or {{null}}
-
setResponse
Set the response associated with this exception or {{null}}- Parameters:
response
- response
-
getHttpStatusCode
public int getHttpStatusCode()- Returns:
- the httpStatusCode
-
getMessage
- Overrides:
getMessage
in classThrowable
-
toString
-