Package com.bumptech.glide.load
Class HttpException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.io.IOException
com.bumptech.glide.load.HttpException
- All Implemented Interfaces:
Serializable
Thrown when an http request fails.
Exposes the specific status code or UNKNOWN via getStatusCode() so users may
attempt to retry or otherwise uniformly handle certain types of errors regardless of the
underlying http library.
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionHttpException(int statusCode) HttpException(String message) Deprecated.HttpException(String message, int statusCode) HttpException(String message, int statusCode, Throwable cause) -
Method Summary
Modifier and TypeMethodDescriptionintReturns the http status code, orUNKNOWNif the request failed without providing a status code.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
UNKNOWN
public static final int UNKNOWN- See Also:
-
-
Constructor Details
-
HttpException
public HttpException(int statusCode) -
HttpException
Deprecated.You should always include a status code, default toUNKNOWNif you can't come up with a reasonable one. This method will be removed in a future version. -
HttpException
-
HttpException
-
-
Method Details
-
getStatusCode
public int getStatusCode()Returns the http status code, orUNKNOWNif the request failed without providing a status code.
-
UNKNOWNif you can't come up with a reasonable one.