Example usage for org.springframework.batch.core UnexpectedJobExecutionException UnexpectedJobExecutionException

List of usage examples for org.springframework.batch.core UnexpectedJobExecutionException UnexpectedJobExecutionException

Introduction

In this page you can find the example usage for org.springframework.batch.core UnexpectedJobExecutionException UnexpectedJobExecutionException.

Prototype

public UnexpectedJobExecutionException(String msg) 

Source Link

Document

Constructs a new instance with a message.

Usage

From source file:kr.okplace.job.support.ExceptionThrowingItemReaderProxy.java

public T read() throws Exception {

    counter++;/*from w w w. ja  va  2s  .c om*/
    if (counter == throwExceptionOnRecordNumber) {
        throw new UnexpectedJobExecutionException("Planned failure on count=" + counter);
    }

    return delegate.read();
}