public class Exceptions extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
Exceptions.IThrowableVisitor<T>
Visitor used to visit
Throwable chains |
static class |
Exceptions.Visit<T>
Represents a visit
|
| Modifier and Type | Method and Description |
|---|---|
static <T extends Throwable> |
findCause(Throwable throwable,
Class<T> causeType)
Looks for a cause of the specified type in throwable's chain
|
Throwable |
getRootCause(Throwable throwable)
Gets root cause of the throwable
|
static <T> T |
visit(Throwable throwable,
Exceptions.IThrowableVisitor<T> visitor)
Visits the
Throwable's chain |
public Throwable getRootCause(Throwable throwable)
throwable - public static <T extends Throwable> T findCause(Throwable throwable, Class<T> causeType)
T - throwable - causeType - Throwable in the chain or null if nonepublic static <T> T visit(Throwable throwable, Exceptions.IThrowableVisitor<T> visitor)
Throwable's chainT - throwable - visitor - null if noneCopyright © 2006–2020 Apache Software Foundation. All rights reserved.