Using Asserts with IllegalArgumentException/IllegalStateException instead of ConfigurationException.

This commit is contained in:
Mark Fisher
2008-09-30 03:44:40 +00:00
parent 590d346f08
commit 8cea74f062
3 changed files with 9 additions and 12 deletions

View File

@@ -21,8 +21,6 @@ import java.util.Date;
import org.quartz.CronExpression;
import org.springframework.integration.ConfigurationException;
/**
* A trigger that uses a cron expression.
*
@@ -39,8 +37,9 @@ public class CronTrigger implements Trigger {
public CronTrigger(String expression) {
try {
this.expression = new CronExpression(expression);
} catch (ParseException e) {
throw new ConfigurationException(
}
catch (ParseException e) {
throw new IllegalArgumentException(
"failed to parse cron expression: " + expression);
}
}