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:
java.io.Serializable
public final class HttpException extends java.io.IOExceptionThrown when an http request fails.Exposes the specific status code or
UNKNOWNviagetStatusCode()so users may attempt to retry or otherwise uniformly handle certain types of errors regardless of the underlying http library.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static intUNKNOWN
-
Constructor Summary
Constructors Constructor Description HttpException(int statusCode)HttpException(java.lang.String message)Deprecated.You should always include a status code, default toUNKNOWNif you can't come up with a reasonable one.HttpException(java.lang.String message, int statusCode)HttpException(java.lang.String message, int statusCode, java.lang.Throwable cause)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetStatusCode()Returns the http status code, orUNKNOWNif the request failed without providing a status code.
-
-
-
Field Detail
-
UNKNOWN
public static final int UNKNOWN
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
HttpException
public HttpException(int statusCode)
-
HttpException
@Deprecated public HttpException(java.lang.String message)
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
public HttpException(java.lang.String message, int statusCode)
-
HttpException
public HttpException(java.lang.String message, int statusCode, @Nullable java.lang.Throwable cause)
-
-
Method Detail
-
getStatusCode
public int getStatusCode()
Returns the http status code, orUNKNOWNif the request failed without providing a status code.
-
-