exception handling processIt on ImportInvoice.java

This commit is contained in:
Edwin Ang 2012-04-09 15:04:25 +07:00
parent 1bcf538411
commit f0b5dc0592
1 changed files with 10 additions and 2 deletions

View File

@ -644,7 +644,11 @@ public class ImportInvoice extends SvrProcess
{
if (invoice != null)
{
invoice.processIt(m_docAction);
if (!invoice.processIt(m_docAction)) {
log.warning("Invoice Process Failed: " + invoice + " - " + invoice.getProcessMsg());
throw new IllegalStateException("Invoice Process Failed: " + invoice + " - " + invoice.getProcessMsg());
}
invoice.saveEx();
}
// Group Change
@ -740,7 +744,11 @@ public class ImportInvoice extends SvrProcess
}
if (invoice != null)
{
invoice.processIt (m_docAction);
if(!invoice.processIt (m_docAction)) {
log.warning("Invoice Process Failed: " + invoice + " - " + invoice.getProcessMsg());
throw new IllegalStateException("Invoice Process Failed: " + invoice + " - " + invoice.getProcessMsg());
}
invoice.saveEx();
}
rs.close();