From a6a11d65f79ae977a149459be75f1d504e76258f Mon Sep 17 00:00:00 2001 From: uthadehikaru Date: Sat, 21 Apr 2012 15:39:45 -0500 Subject: [PATCH] exception handling processIt on MInOut --- org.adempiere.base/src/org/compiere/model/MInOut.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/org.adempiere.base/src/org/compiere/model/MInOut.java b/org.adempiere.base/src/org/compiere/model/MInOut.java index 73a4c62fad..3692c07ac6 100644 --- a/org.adempiere.base/src/org/compiere/model/MInOut.java +++ b/org.adempiere.base/src/org/compiere/model/MInOut.java @@ -1684,7 +1684,10 @@ public class MInOut extends X_M_InOut implements DocAction log.fine(dropShipment.toString()); dropShipment.setDocAction(DocAction.ACTION_Complete); - dropShipment.processIt(DocAction.ACTION_Complete); + // added AdempiereException by Amir Sehan + if (!dropShipment.processIt(DocAction.ACTION_Complete)) + throw new AdempiereException("Failed Processing Document - " + dropShipment); + // end added dropShipment.saveEx(); return dropShipment; @@ -1903,7 +1906,10 @@ public class MInOut extends X_M_InOut implements DocAction if (counterDT.getDocAction() != null) { counter.setDocAction(counterDT.getDocAction()); - counter.processIt(counterDT.getDocAction()); + // added AdempiereException by Amir Sehan + if (!counter.processIt(counterDT.getDocAction())) + throw new AdempiereException("Failed Processing Document - " + counter); + // end added counter.saveEx(get_TrxName()); } }