Class APICommunicationException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- com.github.m0nk3y2k4.thetvdb.api.exception.APIException
-
- com.github.m0nk3y2k4.thetvdb.internal.exception.APICommunicationException
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
APINotAuthorizedException
public class APICommunicationException extends APIException
Exception indicating problems while communicating with the remote API. This includes general IO issues as well as checked communication level errors returned by the API as declared in the interface description.
The only checked response error that is not covered by this exception is HTTP-401 which is handled by a more distinctive exception type:APINotAuthorizedException
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.github.m0nk3y2k4.thetvdb.api.exception.APIException
API_BAD_METHOD_ERROR, API_CONFLICT_ERROR, API_JSON_PARSE_ERROR, API_NOT_AUTHORIZED_ERROR, API_NOT_FOUND_ERROR, API_SERVICE_UNAVAILABLE
-
-
Constructor Summary
Constructors Constructor Description APICommunicationException(String message)
Creates a new API communication exception with the given error messageAPICommunicationException(String message, String details)
Creates a new API communication exception with an extended error messageAPICommunicationException(String message, Throwable cause)
Creates a nested API communication exception wrapping some other root exception
-
Method Summary
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
APICommunicationException
public APICommunicationException(String message)
Creates a new API communication exception with the given error message- Parameters:
message
- Brief error message describing the problem
-
APICommunicationException
public APICommunicationException(@Nonnull String message, @Nonnull String details)
Creates a new API communication exception with an extended error message- Parameters:
message
- Brief error message describing the problem. This message may contain a single %s conversion which will be automatically replaced with the givendetails
message text.details
- A more detailed error description
-
-