Class ThrowableUtils
java.lang.Object
io.servicetalk.concurrent.internal.ThrowableUtils
Utility for creating static
Throwable
s.-
Method Summary
Modifier and TypeMethodDescriptionstatic Throwable
catchUnexpected
(Throwable delayedCause, Throwable cause) Used in scenarios where multiple operations which aren't expected to throw but exception propagation must be delayed to preserve control flow.static boolean
Finds if the passedoriginal
or any of its causes are an instance oftoMatch
.static <T extends Throwable>
TunknownStackTrace
(T cause, Class<?> clazz, String method)
-
Method Details
-
unknownStackTrace
- Type Parameters:
T
- The type ofThrowable
.- Parameters:
cause
- The cause to initialize.clazz
- The class where thecause
is thrown from.method
- The method where thecause
is thrown from.- Returns:
cause
after the stack trace has been initialized.
-
matches
Finds if the passedoriginal
or any of its causes are an instance oftoMatch
. -
catchUnexpected
Used in scenarios where multiple operations which aren't expected to throw but exception propagation must be delayed to preserve control flow.
-