From fa2b04a1db5f547ae67f8c663a854e5e8084205c Mon Sep 17 00:00:00 2001 From: robokaso Date: Wed, 15 Oct 2008 09:26:08 +0000 Subject: [PATCH] RESOLVED - BATCH-825: Modify JobLauncher contract to not throw exception on job failure. exceptions are now logged before added to failure list --- .../java/org/springframework/batch/core/job/AbstractJob.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/job/AbstractJob.java b/spring-batch-core/src/main/java/org/springframework/batch/core/job/AbstractJob.java index 18707e1ea..851a511cb 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/job/AbstractJob.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/job/AbstractJob.java @@ -238,10 +238,12 @@ public abstract class AbstractJob implements Job, BeanNameAware, InitializingBea } catch (JobInterruptedException e) { + logger.error(e); execution.setStatus(BatchStatus.STOPPED); execution.addFailureException(e); } catch (Throwable t) { + logger.error(t); execution.setStatus(BatchStatus.FAILED); execution.addFailureException(t); }