public class CompositeExceptionHandler extends Object implements ExceptionHandler
ExceptionHandler
that loops though a list of delegates.Constructor and Description |
---|
CompositeExceptionHandler() |
Modifier and Type | Method and Description |
---|---|
void |
handleException(RepeatContext context,
Throwable throwable)
Iterate over the handlers delegating the call to each in turn.
|
void |
setHandlers(ExceptionHandler[] handlers) |
public void setHandlers(ExceptionHandler[] handlers)
public void handleException(RepeatContext context, Throwable throwable) throws Throwable
handleException
in interface ExceptionHandler
context
- the current RepeatContext
. Can be used to store
state (via attributes), for example to count the number of occurrences of
a particular exception type and implement a threshold policy.throwable
- an exception.Throwable
- implementations are free to re-throw the exceptionExceptionHandler.handleException(RepeatContext, Throwable)
Copyright © 2014 Pivotal. All rights reserved.