Example usage for org.springframework.batch.item.file FlatFileParseException getLineNumber

List of usage examples for org.springframework.batch.item.file FlatFileParseException getLineNumber

Introduction

In this page you can find the example usage for org.springframework.batch.item.file FlatFileParseException getLineNumber.

Prototype

public int getLineNumber() 

Source Link

Usage

From source file:org.springframework.batch.integration.samples.payments.PaymentChunkListener.java

@Override
public void onReadError(Exception ex) {
    if (ex instanceof FlatFileParseException) {
        FlatFileParseException ffpe = (FlatFileParseException) ex;
        logger.error(String.format("Error reading data on line '%s' - data: '%s'", ffpe.getLineNumber(),
                ffpe.getInput()));/* w  w  w.j a v a  2s.c  om*/
    }
    chunkNotificationsChannel.send(MessageBuilder.withPayload(new Notification(ex.getMessage(), true)).build());
}