RESOLVED - issue BATCH-491: checked exception handling

http://jira.springframework.org/browse/BATCH-491

exception wrapping and unwrapping moved into RepeatTemplate.
This commit is contained in:
robokaso
2008-03-25 10:58:08 +00:00
parent 0201bcb2b3
commit 49b6ebe51e
6 changed files with 36 additions and 43 deletions

View File

@@ -29,9 +29,7 @@ import org.springframework.aop.framework.Advised;
import org.springframework.aop.framework.ProxyFactory;
import org.springframework.batch.repeat.ExitStatus;
import org.springframework.batch.repeat.RepeatCallback;
import org.springframework.batch.repeat.RepeatException;
import org.springframework.batch.repeat.RepeatOperations;
import org.springframework.batch.repeat.interceptor.RepeatOperationsInterceptor;
import org.springframework.batch.repeat.policy.SimpleCompletionPolicy;
import org.springframework.batch.repeat.support.RepeatTemplate;
@@ -100,8 +98,8 @@ public class RepeatOperationsInterceptorTests extends TestCase {
try {
service.error();
fail("Expected BatchException");
} catch (RepeatException e) {
assertEquals("Unexpected", e.getMessage().substring(0, 10));
} catch (Error e) {
assertEquals("Duh", e.getMessage().substring(0, 3));
}
}