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:
robokaso
2008-03-18 09:55:07 +00:00
parent 8768f15581
commit 9f9d909b5a
3 changed files with 17 additions and 3 deletions

View File

@@ -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);
}
}

View File

@@ -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());
}
}