public class ThrowableClassifier extends Object
| 构造器和说明 |
|---|
ThrowableClassifier() |
| 限定符和类型 | 方法和说明 |
|---|---|
static Optional<Throwable> |
findThrowableOfThrowableType(Throwable throwable,
ThrowableType throwableType)
Checks whether a throwable chain contains a specific throwable type and returns the
corresponding throwable.
|
static ThrowableType |
getThrowableType(Throwable cause)
Classify the exceptions by extracting the
ThrowableType from a potential ThrowableAnnotation. |
public static ThrowableType getThrowableType(Throwable cause)
ThrowableType from a potential ThrowableAnnotation.cause - the Throwable to classify.ThrowableType or ThrowableType.RecoverableError if there is no
such annotation.public static Optional<Throwable> findThrowableOfThrowableType(Throwable throwable, ThrowableType throwableType)
throwable - the throwable chain to check.throwableType - the throwable type to search for in the chain.Copyright © 2014–2022 The Apache Software Foundation. All rights reserved.