public final class GlideException extends Exception
Constructor and Description |
---|
GlideException(String message) |
GlideException(String detailMessage,
Exception cause) |
GlideException(String detailMessage,
List<Exception> causes) |
Modifier and Type | Method and Description |
---|---|
Throwable |
fillInStackTrace() |
List<Exception> |
getCauses()
Returns a list of causes that are immediate children of this exception.
|
String |
getMessage() |
List<Exception> |
getRootCauses()
Returns the list of root causes that are the leaf nodes of all children of this exception.
|
void |
logRootCauses(String tag)
Logs all root causes using the given tag.
|
void |
printStackTrace() |
void |
printStackTrace(PrintStream err) |
void |
printStackTrace(PrintWriter err) |
addSuppressed, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, setStackTrace, toString
public GlideException(String message)
public Throwable fillInStackTrace()
fillInStackTrace
in class Throwable
public List<Exception> 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 List<Exception> 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(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 Throwable
public void printStackTrace(PrintStream err)
printStackTrace
in class Throwable
public void printStackTrace(PrintWriter err)
printStackTrace
in class Throwable
public String getMessage()
getMessage
in class Throwable