Package com.inrupt.client.solid
Class SolidClientException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.inrupt.client.InruptClientException
com.inrupt.client.solid.SolidClientException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
BadRequestException
,ConflictException
,ForbiddenException
,GoneException
,InternalServerErrorException
,MethodNotAllowedException
,NotAcceptableException
,NotFoundException
,PreconditionFailedException
,TooManyRequestsException
,UnauthorizedException
,UnsupportedMediaTypeException
A runtime exception for use with SolidClient HTTP operations.
- See Also:
-
Constructor Summary
ConstructorDescriptionSolidClientException
(String message, URI uri, int statusCode, Headers headers, String body) Create a SolidClient exception. -
Method Summary
Modifier and TypeMethodDescriptiongetBody()
Retrieve the body associated with this exception.Retrieve the headers associated with this exception.int
Retrieve the status code associated with this exception.getUri()
Retrieve the URI associated with this exception.static SolidClientException
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
SolidClientException
Create a SolidClient exception.- Parameters:
message
- the messageuri
- the uristatusCode
- the HTTP status codeheaders
- the response headersbody
- the body
-
-
Method Details
-
getUri
Retrieve the URI associated with this exception.- Returns:
- the uri
-
getStatusCode
public int getStatusCode()Retrieve the status code associated with this exception.- Returns:
- the status code
-
getHeaders
Retrieve the headers associated with this exception.- Returns:
- the headers
-
getBody
Retrieve the body associated with this exception.- Returns:
- the body
-
handle
public static SolidClientException handle(String message, URI uri, int statusCode, Headers headers, String body)
-