public final class GlideException
extends java.lang.Exception
Constructor and Description |
---|
GlideException(java.lang.String message) |
GlideException(java.lang.String detailMessage,
java.util.List<java.lang.Throwable> causes) |
GlideException(java.lang.String detailMessage,
java.lang.Throwable cause) |
Modifier and Type | Method and Description |
---|---|
java.lang.Throwable |
fillInStackTrace() |
java.util.List<java.lang.Throwable> |
getCauses()
Returns a list of causes that are immediate children of this exception.
|
java.lang.String |
getMessage() |
java.lang.Exception |
getOrigin()
Returns an
Exception with a stack trace that includes where the request originated (if
previously set via setOrigin(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.
|
void |
logRootCauses(java.lang.String tag)
Logs all root causes using the given tag.
|
void |
printStackTrace() |
void |
printStackTrace(java.io.PrintStream err) |
void |
printStackTrace(java.io.PrintWriter err) |
void |
setOrigin(java.lang.Exception exception)
Sets a stack trace that includes where the request originated.
|
public GlideException(java.lang.String message)
public GlideException(java.lang.String detailMessage, java.lang.Throwable cause)
public GlideException(java.lang.String detailMessage, java.util.List<java.lang.Throwable> causes)
public void setOrigin(@Nullable java.lang.Exception exception)
This is an experimental API that may be removed in the future.
@Nullable public java.lang.Exception getOrigin()
Exception
with a stack trace that includes where the request originated (if
previously set via setOrigin(Exception)
)
This is an experimental API that may be removed in the future.
public java.lang.Throwable fillInStackTrace()
fillInStackTrace
in class java.lang.Throwable
public java.util.List<java.lang.Throwable> getCauses()
Causes may or may not be GlideExceptions
. Causes may also not be root
causes, and in turn my have been caused by other failures.
getRootCauses()
public java.util.List<java.lang.Throwable> getRootCauses()
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.
public void logRootCauses(java.lang.String 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.
public void printStackTrace()
printStackTrace
in class java.lang.Throwable
public void printStackTrace(java.io.PrintStream err)
printStackTrace
in class java.lang.Throwable
public void printStackTrace(java.io.PrintWriter err)
printStackTrace
in class java.lang.Throwable
public java.lang.String getMessage()
getMessage
in class java.lang.Throwable