exception handling processIt on ExpenseSOrder.java

This commit is contained in:
Edwin Ang 2012-04-09 15:04:35 +07:00
parent f0b5dc0592
commit bf4464cb9e
1 changed files with 4 additions and 1 deletions

View File

@ -270,7 +270,10 @@ public class ExpenseSOrder extends SvrProcess
if (m_order == null) if (m_order == null)
return; return;
m_order.setDocAction(DocAction.ACTION_Prepare); 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()) if (!m_order.save())
throw new IllegalStateException("Cannot save Order"); throw new IllegalStateException("Cannot save Order");
m_noOrders++; m_noOrders++;