From bf4464cb9e19f561b80aaef3826d6d8822d78e53 Mon Sep 17 00:00:00 2001 From: Edwin Ang Date: Mon, 9 Apr 2012 15:04:35 +0700 Subject: [PATCH] exception handling processIt on ExpenseSOrder.java --- .../src/org/compiere/process/ExpenseSOrder.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/org.adempiere.base.process/src/org/compiere/process/ExpenseSOrder.java b/org.adempiere.base.process/src/org/compiere/process/ExpenseSOrder.java index 55b339ab55..a60b9852d6 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ExpenseSOrder.java +++ b/org.adempiere.base.process/src/org/compiere/process/ExpenseSOrder.java @@ -270,7 +270,10 @@ public class ExpenseSOrder extends SvrProcess if (m_order == null) return; m_order.setDocAction(DocAction.ACTION_Prepare); - m_order.processIt(DocAction.ACTION_Prepare); + if (!m_order.processIt(DocAction.ACTION_Prepare)) { + log.warning("Order Process Failed: " + m_order + " - " + m_order.getProcessMsg()); + throw new IllegalStateException("Order Process Failed: " + m_order + " - " + m_order.getProcessMsg()); + } if (!m_order.save()) throw new IllegalStateException("Cannot save Order"); m_noOrders++;