From 1fe7383c4768891d6fbb54e106d238292bf09c5c Mon Sep 17 00:00:00 2001 From: uthadehikaru Date: Wed, 11 Apr 2012 08:26:21 +0700 Subject: [PATCH] exception handling processIt on MCashLine --- org.adempiere.base/src/org/compiere/model/MCashLine.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/org.adempiere.base/src/org/compiere/model/MCashLine.java b/org.adempiere.base/src/org/compiere/model/MCashLine.java index 5202795a8a..ccb3247515 100644 --- a/org.adempiere.base/src/org/compiere/model/MCashLine.java +++ b/org.adempiere.base/src/org/compiere/model/MCashLine.java @@ -21,6 +21,7 @@ import java.sql.ResultSet; import java.sql.Timestamp; import java.util.Properties; +import org.adempiere.exceptions.AdempiereException; import org.compiere.util.DB; import org.compiere.util.Env; import org.compiere.util.Msg; @@ -154,7 +155,10 @@ public class MCashLine extends X_C_CashLine { saveEx(trxName); order.setC_CashLine_ID(getC_CashLine_ID()); - order.processIt(MOrder.ACTION_WaitComplete); + // added AdempiereException by Amir Sehan + if (!order.processIt(MOrder.ACTION_WaitComplete)) + throw new AdempiereException("Failed processing Document - " + order); + // end added order.saveEx(trxName); // Set Invoice MInvoice[] invoices = order.getInvoices();