Tidy up some exception class names

This commit is contained in:
dsyer
2008-03-01 11:59:33 +00:00
parent 90cb1e8ea3
commit b47a6e6405
51 changed files with 167 additions and 259 deletions

View File

@@ -16,7 +16,7 @@
package org.springframework.batch.sample.item.writer;
import org.springframework.batch.io.exception.BatchCriticalException;
import org.springframework.batch.io.exception.InfrastructureException;
import org.springframework.batch.item.writer.DelegatingItemWriter;
import org.springframework.batch.sample.domain.Order;
@@ -25,7 +25,7 @@ import org.springframework.batch.sample.domain.Order;
public class OrderWriter extends DelegatingItemWriter {
public Object doProcess(Object data) {
if (!(data instanceof Order)) {
throw new BatchCriticalException("OrderProcessor can process only Order objects");
throw new InfrastructureException("OrderProcessor can process only Order objects");
}
return data;
}

View File

@@ -17,7 +17,7 @@
package org.springframework.batch.sample.tasklet;
import org.springframework.batch.io.exception.BatchCriticalException;
import org.springframework.batch.io.exception.InfrastructureException;
import org.springframework.batch.item.ItemReader;
import org.springframework.batch.item.reader.DelegatingItemReader;
@@ -49,7 +49,7 @@ public class ExceptionThrowingItemReaderProxy extends DelegatingItemReader {
counter++;
if (counter == throwExceptionOnRecordNumber) {
throw new BatchCriticalException("Planned failure on count="+counter);
throw new InfrastructureException("Planned failure on count="+counter);
}
return super.read();