ExceptionLoggingCallable
public ExceptionLoggingCallable(Callable<V> callable,
boolean rethrow,
Logger logger)
Wraps the designated callable to catch and log exceptions and virtual machine errors to
the designated logger and optionally rethrowing the exception/virtual machine error.
In case of a scheduled runnable, rethrowing will stop further executions.
- Parameters:
callable
- The wrapped callable.
rethrow
- Whether to rethrow an occurred exception or virtual machine error.
logger
- The logger with which to log an exception.