public abstract class Recorder.Block
Abstraction of a block of code that produces a result of type T and may throw exceptions. Any exception thrown by Callable.call will be passed to the handleException(Exception) method. Default implementation of this method is to repackage the exception as RuntimeException unless it already is one.
- the type of result produced by executing this block of code.Type | Name and description |
---|---|
void |
handleException(Exception e) Notification that an exception was raised during the call() method invocation. |
Notification that an exception was raised during the call() method invocation. Default behavior is to repackage as a RuntimeException, subclasses can choose differently including swallowing the exception. Swallowing the exception will make the Recorder.record return null.
e
- the exception raised during the call() execution.