Class GlideException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- com.bumptech.glide.load.engine.GlideException
-
- All Implemented Interfaces:
java.io.Serializable
public final class GlideException extends java.lang.ExceptionAn exception with zero or more causes indicating why a load in Glide failed.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description GlideException(java.lang.String message)GlideException(java.lang.String detailMessage, java.lang.Throwable cause)GlideException(java.lang.String detailMessage, java.util.List<java.lang.Throwable> causes)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.ThrowablefillInStackTrace()java.util.List<java.lang.Throwable>getCauses()Returns a list of causes that are immediate children of this exception.java.lang.StringgetMessage()java.lang.ExceptiongetOrigin()Returns anExceptionwith a stack trace that includes where the request originated (if previously set viasetOrigin(Exception))java.util.List<java.lang.Throwable>getRootCauses()Returns the list of root causes that are the leaf nodes of all children of this exception.voidlogRootCauses(java.lang.String tag)Logs all root causes using the given tag.voidprintStackTrace()voidprintStackTrace(java.io.PrintStream err)voidprintStackTrace(java.io.PrintWriter err)voidsetOrigin(java.lang.Exception exception)Sets a stack trace that includes where the request originated.
-
-
-
Method Detail
-
setOrigin
public void setOrigin(@Nullable java.lang.Exception exception)Sets a stack trace that includes where the request originated.This is an experimental API that may be removed in the future.
-
getOrigin
@Nullable public java.lang.Exception getOrigin()
Returns anExceptionwith a stack trace that includes where the request originated (if previously set viasetOrigin(Exception))This is an experimental API that may be removed in the future.
-
fillInStackTrace
public java.lang.Throwable fillInStackTrace()
- Overrides:
fillInStackTracein classjava.lang.Throwable
-
getCauses
public java.util.List<java.lang.Throwable> getCauses()
Returns a list of causes that are immediate children of this exception.Causes may or may not be
GlideExceptions. Causes may also not be root causes, and in turn my have been caused by other failures.- See Also:
getRootCauses()
-
getRootCauses
public java.util.List<java.lang.Throwable> getRootCauses()
Returns the list of root causes that are the leaf nodes of all children of this exception.Use this method to do things like look for http exceptions that indicate the load may have failed due to an error that can be retried. Keep in mind that because Glide may attempt to load a given model using multiple different pathways, there may be multiple related or unrelated reasons for a load to fail.
-
logRootCauses
public void logRootCauses(java.lang.String tag)
Logs all root causes using the given tag.Each root cause is logged separately to avoid throttling.
printStackTrace()will provide a more succinct overview of why the exception occurred, although it does not include complete stack traces.
-
printStackTrace
public void printStackTrace()
- Overrides:
printStackTracein classjava.lang.Throwable
-
printStackTrace
public void printStackTrace(java.io.PrintStream err)
- Overrides:
printStackTracein classjava.lang.Throwable
-
printStackTrace
public void printStackTrace(java.io.PrintWriter err)
- Overrides:
printStackTracein classjava.lang.Throwable
-
getMessage
public java.lang.String getMessage()
- Overrides:
getMessagein classjava.lang.Throwable
-
-