Example usage for org.springframework.batch.repeat RepeatException RepeatException

List of usage examples for org.springframework.batch.repeat RepeatException RepeatException

Introduction

In this page you can find the example usage for org.springframework.batch.repeat RepeatException RepeatException.

Prototype

public RepeatException(String msg, Throwable t) 

Source Link

Usage

From source file:org.springframework.batch.repeat.support.RepeatTemplate.java

/**
 * Re-throws the original throwable if it is unchecked, wraps checked
 * exceptions into {@link RepeatException}.
 *///from www.j a v  a  2  s .c  o m
private static void rethrow(Throwable throwable) throws RuntimeException {
    if (throwable instanceof Error) {
        throw (Error) throwable;
    } else if (throwable instanceof RuntimeException) {
        throw (RuntimeException) throwable;
    } else {
        throw new RepeatException("Exception in batch process", throwable);
    }
}