T - The type of exception that the action might throw@FunctionalInterface public static interface FlakyTestRunner.RunnableThrows<T extends Throwable>
| Modifier and Type | Method and Description |
|---|---|
void |
run()
Performs an action.
|
default void |
runOrThrow()
Performs the action wrapping any thrown Throwable in an IllegalStateException.
|
default void |
runOrThrow(Function<? super Throwable,? extends RuntimeException> exceptionMapper)
Performs the action wrapping any thrown Throwable using the provided
exceptionMapper. |
default void runOrThrow()
IllegalStateException - if an underlying Throwable is throwndefault void runOrThrow(Function<? super Throwable,? extends RuntimeException> exceptionMapper)
exceptionMapper.
This allows customization of how exceptions should be handled and converted.exceptionMapper - A function mapping a caught Throwable to a RuntimeExceptionRuntimeException - if an underlying Throwable is thrownCopyright © 2023. All rights reserved.