exception handline on RequestInvoice.java

This commit is contained in:
Edwin Ang 2012-04-09 15:02:17 +07:00
parent b26a378b85
commit bb9e72c47a
1 changed files with 5 additions and 1 deletions

View File

@ -178,7 +178,11 @@ public class RequestInvoice extends SvrProcess
m_invoice.delete(false); m_invoice.delete(false);
else 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(); m_invoice.saveEx();
addLog(0, null, m_invoice.getGrandTotal(), m_invoice.getDocumentNo()); addLog(0, null, m_invoice.getGrandTotal(), m_invoice.getDocumentNo());
} }