From 4621e9809b17aa25a33f31dd87b1d70e48a1ee1f Mon Sep 17 00:00:00 2001 From: Edwin Ang Date: Mon, 9 Apr 2012 15:05:08 +0700 Subject: [PATCH] exception handling processIt on BankStatementPayment.java --- .../src/org/compiere/process/BankStatementPayment.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/org.adempiere.base.process/src/org/compiere/process/BankStatementPayment.java b/org.adempiere.base.process/src/org/compiere/process/BankStatementPayment.java index 1c3107ae2e..dec65b121a 100644 --- a/org.adempiere.base.process/src/org/compiere/process/BankStatementPayment.java +++ b/org.adempiere.base.process/src/org/compiere/process/BankStatementPayment.java @@ -223,7 +223,11 @@ public class BankStatementPayment extends SvrProcess return null; payment.saveEx(); // - payment.processIt(MPayment.DOCACTION_Complete); + if (!payment.processIt(MPayment.DOCACTION_Complete)) { + log.warning("Payment Process Failed: " + payment.getDocumentNo() + " " + payment.getProcessMsg()); + throw new IllegalStateException("Payment Process Failed: " + payment.getDocumentNo() + " " + payment.getProcessMsg()); + + } payment.saveEx(); return payment; } // createPayment