]> git.mxchange.org Git - pizzaservice-war.git/commitdiff
The exception's message now contains the thrown exception's message, too.
authorRoland Haeder <roland@mxchange.org>
Sun, 10 Apr 2016 11:30:12 +0000 (13:30 +0200)
committerRoland Haeder <roland@mxchange.org>
Sun, 10 Apr 2016 11:30:12 +0000 (13:30 +0200)
src/java/org/mxchange/jshopcore/model/category/PizzaCategoryConverter.java
src/java/org/mxchange/pizzaapplication/converter/country/PizzaCountryConverter.java
src/java/org/mxchange/pizzaapplication/converter/smsprovider/PizzaSmsProviderConverter.java
src/java/org/mxchange/pizzaapplication/converter/user/PizzaUserConverter.java
web/WEB-INF/templates/admin/admin_category_selection_box.tpl

index f0f1c6298d1783965381f06dd2f270537a618dfd..677373e12170e34e8ad76a1eb0a7fd7853f9aef2 100644 (file)
@@ -34,7 +34,7 @@ import org.mxchange.jcoreeelogger.beans.local.logger.LoggerBeanLocal;
  * <p>
  * @author Roland Haeder<roland@mxchange.org>
  */
-@FacesConverter (value = "category")
+@FacesConverter ("CategoryConverter")
 public class PizzaCategoryConverter implements Converter {
 
        /**
@@ -64,7 +64,7 @@ public class PizzaCategoryConverter implements Converter {
                        this.loggerBeanLocal = (LoggerBeanLocal) context.lookup("java:global/jcore-logger-ejb/logger!org.mxchange.jcoreeelogger.beans.local.logger.LoggerBeanLocal"); //NOI18N
                } catch (final NamingException ex) {
                        // Continue to throw it
-                       throw new RuntimeException("context.lookup() failed.", ex); //NOI18N
+                       throw new RuntimeException(MessageFormat.format("context.lookup() failed: {0}", ex.getMessage()), ex); //NOI18N
                }
        }
 
index e913d873172593fab4a8bcc38102ff23d930c1eb..3189fc23535f68fef1d8fefd914871c5828779a8 100644 (file)
@@ -66,7 +66,7 @@ public class PizzaCountryConverter implements Converter {
                        this.countryBean = (CountrySingletonBeanRemote) context.lookup("java:global/PizzaService-ejb/country!org.mxchange.jcountry.data.CountrySingletonBeanRemote"); //NOI18N
                } catch (final NamingException ex) {
                        // Continue to throw it
-                       throw new RuntimeException("context.lookup() failed.", ex); //NOI18N
+                       throw new RuntimeException(MessageFormat.format("context.lookup() failed: {0}", ex.getMessage()), ex); //NOI18N
                }
        }
 
index d07345631a582198ebf3ca40beef5a4715c0b09f..ab14e6794597259e3efe92bc29c510fc18724ef6 100644 (file)
@@ -66,7 +66,7 @@ public class PizzaSmsProviderConverter implements Converter {
                        this.providerController = (SmsProviderSingletonBeanRemote) context.lookup("java:global/PizzaService-ejb/smsprovider!org.mxchange.jphone.phonenumbers.smsprovider.SmsProviderSingletonBeanRemote"); //NOI18N
                } catch (final NamingException ex) {
                        // Continue to throw it
-                       throw new RuntimeException("context.lookup() failed.", ex); //NOI18N
+                       throw new RuntimeException(MessageFormat.format("context.lookup() failed: {0}", ex.getMessage()), ex); //NOI18N
                }
        }
 
index 6abdb3a232e7249d0552697787ebc832f3cd609f..8d96937a2fb673d8376d3f2081883c69fa3886f5 100644 (file)
@@ -66,7 +66,7 @@ public class PizzaUserConverter implements Converter {
                        this.userController = (PizzaUserWebSessionController) context.lookup("java:global/PizzaService-ejb/user!org.mxchange.jusercore.model.user.UserSessionBeanRemote"); //NOI18N
                } catch (final NamingException ex) {
                        // Continue to throw it
-                       throw new RuntimeException("context.lookup() failed.", ex); //NOI18N
+                       throw new RuntimeException(MessageFormat.format("context.lookup() failed: {0}", ex.getMessage()), ex); //NOI18N
                }
        }
 
index b40fdcde5b52de2729af9da1c9641d2ed1beeb97..578349c27eddb8153458331657c2688da141290f 100644 (file)
@@ -4,7 +4,7 @@
        xmlns:h="http://java.sun.com/jsf/html"
        xmlns:ui="http://java.sun.com/jsf/facelets">
 
-       <h:selectOneMenu class="select" id="productCategory" value="#{adminProductController.productCategory}" required="true" requiredMessage="#{msg.ADMIN_CATEGORY_MUST_BE_SELECTED}" converter="category">
+       <h:selectOneMenu class="select" id="productCategory" value="#{adminProductController.productCategory}" required="true" requiredMessage="#{msg.ADMIN_CATEGORY_MUST_BE_SELECTED}" converter="CategoryConverter">
                <f:selectItems value="#{shopController.allCategories}" var="cat" itemValue="#{cat}" itemLabel="#{cat.categoryTitle}" />
        </h:selectOneMenu>
 </ui:composition>