From: Roland Haeder Date: Sun, 10 Apr 2016 11:31:56 +0000 (+0200) Subject: The exception's message now contains the thrown exception's message, too. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=1c8a01aa0e2e14a20d7483f8c656f8ebba3062ae;p=jcoreee.git The exception's message now contains the thrown exception's message, too. --- diff --git a/src/org/mxchange/jcoreee/database/BaseDatabaseBean.java b/src/org/mxchange/jcoreee/database/BaseDatabaseBean.java index 982b856..9e82877 100644 --- a/src/org/mxchange/jcoreee/database/BaseDatabaseBean.java +++ b/src/org/mxchange/jcoreee/database/BaseDatabaseBean.java @@ -17,6 +17,7 @@ package org.mxchange.jcoreee.database; import java.io.Serializable; +import java.text.MessageFormat; import javax.naming.Context; import javax.naming.InitialContext; import javax.naming.NamingException; @@ -61,7 +62,7 @@ public abstract class BaseDatabaseBean implements Serializable { 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 - throw new RuntimeException("context.lookup() failed.", ex); //NOI18N + throw new RuntimeException(MessageFormat.format("context.lookup() failed: {0}", ex.getMessage()), ex); //NOI18N } }