]> git.mxchange.org Git - jcore-utils.git/commitdiff
The exception's message now contains the thrown exception's message, too.
authorRoland Haeder <roland@mxchange.org>
Sun, 10 Apr 2016 11:31:56 +0000 (13:31 +0200)
committerRoland Haeder <roland@mxchange.org>
Sun, 10 Apr 2016 11:31:56 +0000 (13:31 +0200)
src/org/mxchange/jcoreee/database/BaseDatabaseBean.java

index 982b856eb610b7956d9270ff0f542039d97bd10e..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
                }
        }