From 1c8a01aa0e2e14a20d7483f8c656f8ebba3062ae Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Sun, 10 Apr 2016 13:31:56 +0200 Subject: [PATCH] The exception's message now contains the thrown exception's message, too. --- src/org/mxchange/jcoreee/database/BaseDatabaseBean.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 } } -- 2.39.5