From 24fd729e479b48ad3cb6334c7687ed356990a5b0 Mon Sep 17 00:00:00 2001 From: teo_sarca Date: Mon, 1 Sep 2008 14:26:09 +0000 Subject: [PATCH] MPPOrderBOMLine: throw exception if using not supported component types --- base/src/org/eevolution/model/MPPOrderBOMLine.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/base/src/org/eevolution/model/MPPOrderBOMLine.java b/base/src/org/eevolution/model/MPPOrderBOMLine.java index 2b8dcca23a..11119c0156 100644 --- a/base/src/org/eevolution/model/MPPOrderBOMLine.java +++ b/base/src/org/eevolution/model/MPPOrderBOMLine.java @@ -19,6 +19,7 @@ import java.math.BigDecimal; import java.sql.ResultSet; import java.util.Properties; +import org.adempiere.exceptions.AdempiereException; import org.compiere.model.MProduct; import org.compiere.util.DB; import org.compiere.util.Env; @@ -208,6 +209,10 @@ public class MPPOrderBOMLine extends X_PP_Order_BOMLine { this.setQtyRequiered(this.getQtyBOM()); } + else + { + throw new AdempiereException("@NotSupported@ @ComponentType@ "+this.getComponentType()); + } } else { @@ -224,6 +229,10 @@ public class MPPOrderBOMLine extends X_PP_Order_BOMLine { this.setQtyRequiered(this.getQtyBOM()); } + else + { + throw new AdempiereException("@NotSupported@ @ComponentType@ "+this.getComponentType()); + } } // Set Scrap of Component