exception handling processIt on ImportOrder.java

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

View File

@ -666,7 +666,11 @@ public class ImportOrder extends SvrProcess
if (m_docAction != null && m_docAction.length() > 0) if (m_docAction != null && m_docAction.length() > 0)
{ {
order.setDocAction(m_docAction); order.setDocAction(m_docAction);
order.processIt (m_docAction); if(!order.processIt (m_docAction)) {
log.warning("Order Process Failed: " + order + " - " + order.getProcessMsg());
throw new IllegalStateException("Order Process Failed: " + order + " - " + order.getProcessMsg());
}
} }
order.saveEx(); order.saveEx();
} }
@ -767,7 +771,11 @@ public class ImportOrder extends SvrProcess
if (m_docAction != null && m_docAction.length() > 0) if (m_docAction != null && m_docAction.length() > 0)
{ {
order.setDocAction(m_docAction); order.setDocAction(m_docAction);
order.processIt (m_docAction); if(!order.processIt (m_docAction)) {
log.warning("Order Process Failed: " + order + " - " + order.getProcessMsg());
throw new IllegalStateException("Order Process Failed: " + order + " - " + order.getProcessMsg());
}
} }
order.saveEx(); order.saveEx();
} }