From: Roland Häder Date: Tue, 26 Apr 2016 13:36:55 +0000 (+0200) Subject: catch newly thrown exception X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=f0ccf4ccd8bdbeb72a13ce3841ba3c5f6933a601;p=pizzaservice-war.git catch newly thrown exception --- diff --git a/src/java/org/mxchange/pizzaapplication/beans/customer/PizzaAdminCustomerWebRequestBean.java b/src/java/org/mxchange/pizzaapplication/beans/customer/PizzaAdminCustomerWebRequestBean.java index d643aaff..2a7a49b1 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/customer/PizzaAdminCustomerWebRequestBean.java +++ b/src/java/org/mxchange/pizzaapplication/beans/customer/PizzaAdminCustomerWebRequestBean.java @@ -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); }