public final class GlideException extends Exception
构造器和说明 |
---|
GlideException(String message) |
GlideException(String detailMessage,
List<Throwable> causes) |
GlideException(String detailMessage,
Throwable cause) |
限定符和类型 | 方法和说明 |
---|---|
Throwable |
fillInStackTrace() |
List<Throwable> |
getCauses()
Returns a list of causes that are immediate children of this exception.
|
String |
getMessage() |
Exception |
getOrigin()
Returns an
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. |
List<Throwable> |
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) |
void |
setOrigin(Exception exception)
Sets a stack trace that includes where the request originated.
|
addSuppressed, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, setStackTrace, toString
public GlideException(String message)
public void setOrigin(@Nullable Exception exception)
This is an experimental API that may be removed in the future.
@Nullable public 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 Throwable fillInStackTrace()
fillInStackTrace
在类中 Throwable
public List<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 List<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(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
在类中 Throwable
public void printStackTrace(PrintStream err)
printStackTrace
在类中 Throwable
public void printStackTrace(PrintWriter err)
printStackTrace
在类中 Throwable
public String getMessage()
getMessage
在类中 Throwable