Added AdempiereException for method processIt in package servlet

This commit is contained in:
uthadehikaru 2012-04-16 12:57:31 +07:00
parent 575dbf64cd
commit 4173cb21a9
1 changed files with 5 additions and 1 deletions

View File

@ -28,6 +28,7 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession; import javax.servlet.http.HttpSession;
import org.adempiere.exceptions.AdempiereException;
import org.compiere.model.MClient; import org.compiere.model.MClient;
import org.compiere.model.MMailMsg; import org.compiere.model.MMailMsg;
import org.compiere.model.MPayment; import org.compiere.model.MPayment;
@ -276,7 +277,10 @@ public class PaymentServlet extends HttpServlet
else else
log.warning("No Order"); log.warning("No Order");
// //
payment.processIt(DocAction.ACTION_Complete); // Added adempiereException by zuhri
if(!payment.processIt(DocAction.ACTION_Complete))
throw new AdempiereException("Failed when processing document - " + payment.getProcessMsg());
// end added by zuhri
payment.saveEx(); payment.saveEx();
sendThanksEMail (request, ctx, payment, wu, wo); sendThanksEMail (request, ctx, payment, wu, wo);
} }