public final class FatalExceptionHandler extends Object implements ExceptionHandler<Object>
Level
.SEVERE and re-throw it wrapped in a RuntimeException
Constructor and Description |
---|
FatalExceptionHandler() |
FatalExceptionHandler(Logger logger) |
Modifier and Type | Method and Description |
---|---|
void |
handleEventException(Throwable ex,
long sequence,
Object event)
Strategy for handling uncaught exceptions when processing an event.
|
void |
handleOnShutdownException(Throwable ex)
Callback to notify of an exception during
LifecycleAware.onShutdown() |
void |
handleOnStartException(Throwable ex)
Callback to notify of an exception during
LifecycleAware.onStart() |
public FatalExceptionHandler()
public FatalExceptionHandler(Logger logger)
public void handleEventException(Throwable ex, long sequence, Object event)
ExceptionHandler
Strategy for handling uncaught exceptions when processing an event.
If the strategy wishes to terminate further processing by the BatchEventProcessor
then it should throw a RuntimeException
.
handleEventException
in interface ExceptionHandler<Object>
ex
- the exception that propagated from the EventHandler
.sequence
- of the event which cause the exception.event
- being processed when the exception occurred. This can be null.public void handleOnStartException(Throwable ex)
ExceptionHandler
LifecycleAware.onStart()
handleOnStartException
in interface ExceptionHandler<Object>
ex
- throw during the starting process.public void handleOnShutdownException(Throwable ex)
ExceptionHandler
LifecycleAware.onShutdown()
handleOnShutdownException
in interface ExceptionHandler<Object>
ex
- throw during the shutdown process.Copyright © 2020. All rights reserved.