Class HttpClientException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
io.micronaut.http.exceptions.HttpException
io.micronaut.http.client.exceptions.HttpClientException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
ContentLengthExceededException, EmptyResponseException, HttpClientResponseException, NoHostException, ReadTimeoutException, ResponseClosedException
Parent class for all HTTP client exceptions.
- Since:
- 1.0
- Author:
- Graeme Rocher
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionHttpClientException(String message) HttpClientException(String message, @Nullable Throwable cause) HttpClientException(String message, @Nullable Throwable cause, boolean shared) -
Method Summary
Modifier and TypeMethodDescription@Nullable Stringfinal @Nullable StringGet the service ID of the http client that produced this exception.final voidsetServiceId(String serviceId) Set the service id that produced this exception.Methods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
HttpClientException
- Parameters:
message- The message
-
HttpClientException
-
HttpClientException
-
-
Method Details
-
getServiceId
Get the service ID of the http client that produced this exception.- Returns:
- The service ID of the client
-
setServiceId
Set the service id that produced this exception.- Parameters:
serviceId- The service id- Throws:
IllegalStateException- If the service ID has already been set, or this is a shared exception (e.g.ReadTimeoutException).
-
getMessage
- Overrides:
getMessagein classThrowable
-