public final class Runnables extends Object
| Modifier and Type | Method and Description |
|---|---|
static Runnable |
catchingAndLoggingThrowables(Runnable runnable)
Wraps a Runnable so that throwables are caught and logged when a Runnable is run.
|
public static Runnable catchingAndLoggingThrowables(Runnable runnable)
ScheduledExecutorService.scheduleAtFixedRate(Runnable, long, long, TimeUnit)
calls to ensure that the scheduled task doesn't get cancelled as a result of an uncaught exception.runnable - The runnable to wrapCopyright © 2017–2022 Apache Software Foundation. All rights reserved.