]> git.mxchange.org Git - pizzaservice-war.git/blobdiff - src/java/org/mxchange/pizzaapplication/beans/product/AdminProductWebBean.java
updated jshop-ee-lib.jar + added thrown exception
[pizzaservice-war.git] / src / java / org / mxchange / pizzaapplication / beans / product / AdminProductWebBean.java
index 0792c6b88cf02c6bf81502de8a328bf4aa9913ba..5ab300db26f54ac9e0460243abdff751d66d1b5a 100644 (file)
@@ -24,6 +24,7 @@ import javax.inject.Named;
 import javax.naming.InitialContext;
 import javax.naming.NamingException;
 import org.mxchange.jcoreee.beans.BaseFrameworkBean;
+import org.mxchange.jshopcore.exceptions.ProductTitleAlreadyUsedException;
 import org.mxchange.jshopcore.model.product.Product;
 import org.mxchange.jshopcore.model.product.ProductSessionBeanRemote;
 
@@ -60,8 +61,13 @@ public class AdminProductWebBean extends BaseFrameworkBean implements AdminProdu
 
        @Override
        public void doAdminAddProduct (final Product product) throws FaceletException {
-               // Call bean
-               this.product.doAdminAddProduct(product);
+               try {
+                       // Call bean
+                       this.product.doAdminAddProduct(product);
+               } catch (final ProductTitleAlreadyUsedException ex) {
+                       // Continue to throw
+                       throw new FaceletException(ex);
+               }
        }
 
        @Override