Example usage for org.springframework.batch.core.step.skip SkipPolicyFailedException SkipPolicyFailedException

List of usage examples for org.springframework.batch.core.step.skip SkipPolicyFailedException SkipPolicyFailedException

Introduction

In this page you can find the example usage for org.springframework.batch.core.step.skip SkipPolicyFailedException SkipPolicyFailedException.

Prototype

public SkipPolicyFailedException(String message, RuntimeException ex, Throwable t) 

Source Link

Usage

From source file:org.springframework.batch.core.jsr.step.item.JsrFaultTolerantChunkProcessor.java

/**
 * Convenience method for calling process skip policy.
 *
 * @param policy the skip policy//from   ww  w  .  ja v a  2  s .c om
 * @param e the cause of the skip
 * @param skipCount the current skip count
 */
private boolean shouldSkip(SkipPolicy policy, Throwable e, int skipCount) {
    try {
        return policy.shouldSkip(e, skipCount);
    } catch (SkipException ex) {
        throw ex;
    } catch (RuntimeException ex) {
        throw new SkipPolicyFailedException("Fatal exception in SkipPolicy.", ex, e);
    }
}