]> git.mxchange.org Git - pizzaservice-war.git/commitdiff
updated jshop-ee-lib.jar + added thrown exception
authorRoland Haeder <roland@mxchange.org>
Wed, 9 Sep 2015 09:26:02 +0000 (11:26 +0200)
committerRoland Haeder <roland@mxchange.org>
Wed, 9 Sep 2015 09:30:24 +0000 (11:30 +0200)
Signed-off-by:Roland Häder <roland@mxchange.org>

lib/jshop-ee-lib.jar
src/java/org/mxchange/pizzaapplication/beans/category/AdminCategoryWebBean.java
src/java/org/mxchange/pizzaapplication/beans/product/AdminProductWebBean.java

index 1697bcc77c63dcbdd0b94e3b806e76bb364a1671..f1e16d8efd7560b53050bbd1a732928a58d38f4e 100644 (file)
Binary files a/lib/jshop-ee-lib.jar and b/lib/jshop-ee-lib.jar differ
index 240437b7b25f63244bf1dd6df46960c34128ecfe..9c5875d5512ca9b87768c502b014c656672673bc 100644 (file)
@@ -23,6 +23,7 @@ import javax.inject.Named;
 import javax.naming.InitialContext;
 import javax.naming.NamingException;
 import org.mxchange.jcoreee.beans.BaseFrameworkBean;
+import org.mxchange.jshopcore.exceptions.CategoryTitleAlreadyUsedException;
 import org.mxchange.jshopcore.model.category.Category;
 import org.mxchange.jshopcore.model.category.CategorySessionBeanRemote;
 
@@ -62,7 +63,7 @@ public class AdminCategoryWebBean extends BaseFrameworkBean implements AdminCate
                try {
                        // Deligate to bean
                        this.category.doAdminAddCategory(category);
-               } catch (final RemoteException ex) {
+               } catch (final CategoryTitleAlreadyUsedException | RemoteException ex) {
                        // Continue to throw
                        throw new FaceletException(ex);
                }
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