RESOLVED - BATCH-950: Exception during rollback hides root cause

don't confuse rollback exception with the rollback cause
This commit is contained in:
robokaso
2008-12-09 11:46:10 +00:00
parent fe28e558bd
commit 22fb6350e1

View File

@@ -315,22 +315,22 @@ public class ItemOrientedStep extends AbstractStep {
catch (Error e) {
try {
processRollback(stepExecution, contribution, fatalException, transaction);
throw e;
}
catch (Exception rollbackException) {
logger.error("Rollback failed, original exception that caused the rollback is", e);
throw rollbackException;
}
throw e;
}
catch (Exception e) {
try {
processRollback(stepExecution, contribution, fatalException, transaction);
throw e;
}
catch (Exception rollbackException) {
logger.error("Rollback failed, original exception that caused the rollback is", e);
throw rollbackException;
}
throw e;
}
finally {
// only release the lock if we acquired it