Class ThrowableUtils
java.lang.Object
io.servicetalk.concurrent.internal.ThrowableUtils
Utility for creating static
Throwables.-
Method Summary
Modifier and TypeMethodDescriptionstatic ThrowablecatchUnexpected(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 booleanFinds if the passedoriginalor 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 thecauseis thrown from.method- The method where thecauseis thrown from.- Returns:
causeafter the stack trace has been initialized.
-
matches
Finds if the passedoriginalor 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.
-