]> git.mxchange.org Git - jcore-utils.git/blobdiff - src/org/mxchange/jcoreee/database/BaseDatabaseBean.java
The exception's message now contains the thrown exception's message, too.
[jcore-utils.git] / src / org / mxchange / jcoreee / database / BaseDatabaseBean.java
index e9073ee524d8deba48c4d75d3be7ee4b5338d483..9e82877a37bf4e0e98e6cc88e11ba6124ea9520d 100644 (file)
@@ -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
                }
        }
 
@@ -82,4 +83,5 @@ public abstract class BaseDatabaseBean implements Serializable {
        protected LoggerBeanLocal getLoggerBeanLocal () {
                return this.loggerBeanLocal;
        }
+
 }