RESOLVED - issue BATCH-472: Exceeding the start limit on a step will cause a vague exception type to be thrown.
http://jira.springframework.org/browse/BATCH-472 added package-private StartLimitExceededException (subclass of UnexpectedJobExecutionException), that takes Step as constructor argument and creates appropriate message
This commit is contained in:
@@ -198,8 +198,7 @@ public class SimpleJob extends AbstractJob {
|
||||
}
|
||||
else {
|
||||
// start max has been exceeded, throw an exception.
|
||||
throw new UnexpectedJobExecutionException("Maximum start limit exceeded for step: " + step.getName()
|
||||
+ "StartMax: " + step.getStartLimit());
|
||||
throw new StartLimitExceededException(step);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
package org.springframework.batch.core.job;
|
||||
|
||||
import org.springframework.batch.core.Step;
|
||||
import org.springframework.batch.core.UnexpectedJobExecutionException;
|
||||
|
||||
/**
|
||||
* Indicates the step's start limit has been exceeded.
|
||||
*/
|
||||
class StartLimitExceededException extends UnexpectedJobExecutionException {
|
||||
|
||||
public StartLimitExceededException(Step step) {
|
||||
super("Maximum start limit exceeded for step: " + step.getName()
|
||||
+ "StartMax: " + step.getStartLimit());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user