List of usage examples for org.springframework.batch.integration.chunk AsynchronousFailureException AsynchronousFailureException
public AsynchronousFailureException(String message, Throwable cause)
From source file:es.fcs.batch.integration.chunk.MyChunkMessageChannelItemWriter.java
/** * Re-throws the original throwable if it is unchecked, wraps checked exceptions into * {@link AsynchronousFailureException}. *///from w w w . j av a 2s . c o m private static AsynchronousFailureException wrapIfNecessary(Throwable throwable) { if (throwable instanceof Error) { throw (Error) throwable; } else if (throwable instanceof AsynchronousFailureException) { return (AsynchronousFailureException) throwable; } else { return new AsynchronousFailureException("Exception in remote process", throwable); } }