org.springframework.batch.repeat.exception

## Class CompositeExceptionHandler

- java.lang.Object
- - org.springframework.batch.repeat.exception.CompositeExceptionHandler

- All Implemented Interfaces:
    ExceptionHandler

      public class CompositeExceptionHandler
      extends java.lang.Object
      implements ExceptionHandler

  Composite `ExceptionHandler` that loops though a list of delegates.
  Author:
    Dave Syer

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CompositeExceptionHandler()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `handleException(RepeatContext context, java.lang.Throwable throwable)` Iterate over the handlers delegating the call to each in turn.
    `void` | `setHandlers(ExceptionHandler[] handlers)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### CompositeExceptionHandler

          public CompositeExceptionHandler()

  - ### Method Detail

    - #### setHandlers

          public void setHandlers(ExceptionHandler[] handlers)

    - #### handleException

          public void handleException(RepeatContext context,
                                      java.lang.Throwable throwable)
                               throws java.lang.Throwable

      Iterate over the handlers delegating the call to each in turn. The chain ends if an exception is thrown.
      Specified by:
        `handleException` in interface `ExceptionHandler`
      Parameters:
        `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.
      Throws:
        `java.lang.Throwable` - implementations are free to re-throw the exception
      See Also:
        `ExceptionHandler.handleException(RepeatContext, Throwable)`