| Constructor and Description |
|---|
Runnables() |
| Modifier and Type | Method and Description |
|---|---|
static void |
assertNoException(Runnable runnable)
Asserts that the given
Runnable does not throw exceptions. |
static Runnable |
withUncaughtExceptionHandler(Runnable runnable,
Thread.UncaughtExceptionHandler uncaughtExceptionHandler)
Guard
Runnable with uncaughtException handler, because ScheduledExecutorService does not respect the one assigned to executing
Thread instance. |
public static void assertNoException(Runnable runnable)
Runnable does not throw exceptions. If the runnable throws
exceptions, then it will call the FatalExitExceptionHandler.runnable - to assert for no exceptionspublic static Runnable withUncaughtExceptionHandler(Runnable runnable, Thread.UncaughtExceptionHandler uncaughtExceptionHandler)
Runnable with uncaughtException handler, because ScheduledExecutorService does not respect the one assigned to executing
Thread instance.runnable - Runnable future to guard.uncaughtExceptionHandler - Handler to call in case of uncaught exception.Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.