[BATCH-432] Polishing up exception declarations

This commit is contained in:
nebhale
2008-03-07 10:40:25 +00:00
parent 2154a70069
commit a60fc1e621
7 changed files with 75 additions and 172 deletions

View File

@@ -16,6 +16,7 @@
package org.springframework.batch.core.repository;
import org.springframework.batch.core.Job;
import org.springframework.batch.core.JobExecutionException;
/**
* Checked exception that indicates a name clash when registering
@@ -24,7 +25,7 @@ import org.springframework.batch.core.Job;
* @author Dave Syer
*
*/
public class DuplicateJobException extends JobException {
public class DuplicateJobException extends JobExecutionException {
/**
* Create an exception with the given message.

View File

@@ -1,44 +0,0 @@
/*
* Copyright 2006-2007 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.batch.core.repository;
import org.springframework.batch.core.Job;
/**
* Base class for checked exceptions related to {@link Job}
* creation, registration or use.
*
* @author Dave Syer
*
*/
public class JobException extends Exception {
/**
* Create an exception with the given message.
*/
public JobException(String msg) {
super(msg);
}
/**
* @param msg The message to send to caller
* @param e the cause of the exception
*/
public JobException(String msg, Throwable e) {
super(msg, e);
}
}

View File

@@ -15,13 +15,15 @@
*/
package org.springframework.batch.core.repository;
import org.springframework.batch.core.JobExecutionException;
/**
* An exception indicating an illegal attempt to restart a job.
*
* @author Dave Syer
*
*/
public class JobRestartException extends JobException {
public class JobRestartException extends JobExecutionException {
/**
* @param string the message

View File

@@ -16,6 +16,7 @@
package org.springframework.batch.core.repository;
import org.springframework.batch.core.Job;
import org.springframework.batch.core.JobExecutionException;
/**
@@ -25,9 +26,7 @@ import org.springframework.batch.core.Job;
* @author Dave Syer
*
*/
public class NoSuchJobException extends JobException {
private static final long serialVersionUID = -8044082897778706564L;
public class NoSuchJobException extends JobExecutionException {
/**
* Create an exception with the given message.