]> git.mxchange.org Git - pizzaservice-war.git/commitdiff
catch newly thrown exception
authorRoland Häder <roland@mxchange.org>
Tue, 26 Apr 2016 13:36:55 +0000 (15:36 +0200)
committerRoland Haeder <roland@mxchange.org>
Wed, 27 Apr 2016 20:06:36 +0000 (22:06 +0200)
src/java/org/mxchange/pizzaapplication/beans/customer/PizzaAdminCustomerWebRequestBean.java

index d643aaffc250b59cff346ef11584ddab8f1027e7..2a7a49b10c36001f7ca53e8893c3c36dd43c3cd3 100644 (file)
@@ -30,6 +30,7 @@ import javax.naming.InitialContext;
 import javax.naming.NamingException;
 import org.mxchange.jcontacts.contact.Contact;
 import org.mxchange.jcontacts.contact.gender.Gender;
+import org.mxchange.jcontacts.exceptions.ContactAlreadyAddedException;
 import org.mxchange.jcustomercore.events.AdminAddedCustomerEvent;
 import org.mxchange.jcustomercore.events.CustomerAdminAddedEvent;
 import org.mxchange.jcustomercore.exceptions.CustomerAlreadyRegisteredException;
@@ -115,7 +116,7 @@ public class PizzaAdminCustomerWebRequestBean implements PizzaAdminCustomerWebRe
                try {
                        // Add customer and return updated
                        updatedCustomer = this.adminCustomerBean.addCustomer(customer);
-               } catch (final CustomerAlreadyRegisteredException ex) {
+               } catch (final CustomerAlreadyRegisteredException | ContactAlreadyAddedException ex) {
                        // Throw again
                        throw new FaceletException(ex);
                }