exception handling processIt on InvoiceBatchProcess.java

This commit is contained in:
Edwin Ang 2012-04-09 15:03:27 +07:00
parent b8e800f1c0
commit 31bce580a0
1 changed files with 5 additions and 1 deletions

View File

@ -155,7 +155,11 @@ public class InvoiceBatchProcess extends SvrProcess
return; return;
m_invoice.setDocAction(p_DocAction); m_invoice.setDocAction(p_DocAction);
m_invoice.processIt(p_DocAction); if(!m_invoice.processIt(p_DocAction)) {
log.warning("Invoice Process Failed: " + m_invoice + " - " + m_invoice.getProcessMsg());
throw new IllegalStateException("Invoice Process Failed: " + m_invoice + " - " + m_invoice.getProcessMsg());
}
m_invoice.saveEx(); m_invoice.saveEx();
addLog(0, m_invoice.getDateInvoiced(), m_invoice.getGrandTotal(), m_invoice.getDocumentNo()); addLog(0, m_invoice.getDateInvoiced(), m_invoice.getGrandTotal(), m_invoice.getDocumentNo());