From bb9e72c47ae6be49ddce826901ad922e25ffc0a5 Mon Sep 17 00:00:00 2001 From: Edwin Ang Date: Mon, 9 Apr 2012 15:02:17 +0700 Subject: [PATCH] exception handline on RequestInvoice.java --- .../src/org/compiere/process/RequestInvoice.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/org.adempiere.base.process/src/org/compiere/process/RequestInvoice.java b/org.adempiere.base.process/src/org/compiere/process/RequestInvoice.java index 0bb6e63765..845333d2f3 100644 --- a/org.adempiere.base.process/src/org/compiere/process/RequestInvoice.java +++ b/org.adempiere.base.process/src/org/compiere/process/RequestInvoice.java @@ -178,7 +178,11 @@ public class RequestInvoice extends SvrProcess m_invoice.delete(false); else { - m_invoice.processIt(MInvoice.ACTION_Prepare); + if(!m_invoice.processIt(MInvoice.ACTION_Prepare)) { + log.warning("Invoice Process Failed: " + m_invoice + " - " + m_invoice.getProcessMsg()); + throw new IllegalStateException("Invoice Process Failed: " + m_invoice + " - " + m_invoice.getProcessMsg()); + + } m_invoice.saveEx(); addLog(0, null, m_invoice.getGrandTotal(), m_invoice.getDocumentNo()); }