tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r656035 - in /tomcat/trunk/java/org/apache/tomcat/util/net/jsse: JSSESocketFactory.java res/LocalStrings.properties
Date Tue, 13 May 2008 22:32:17 GMT
Author: markt
Date: Tue May 13 15:32:17 2008
New Revision: 656035

URL: http://svn.apache.org/viewvc?rev=656035&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=44968
Provide more information when keystore load fails

Modified:
    tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java
    tomcat/trunk/java/org/apache/tomcat/util/net/jsse/res/LocalStrings.properties

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java?rev=656035&r1=656034&r2=656035&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java Tue May 13 15:32:17
2008
@@ -321,13 +321,18 @@
 
             ks.load(istream, pass.toCharArray());
         } catch (FileNotFoundException fnfe) {
+            log.error(sm.getString("jsse.keystore_load_failed", type, path,
+                    fnfe.getMessage()));
             throw fnfe;
         } catch (IOException ioe) {
+            log.error(sm.getString("jsse.keystore_load_failed", type, path,
+                    ioe.getMessage()));
             throw ioe;      
         } catch(Exception ex) {
-            log.error("Exception trying to load keystore " +path,ex);
-            throw new IOException("Exception trying to load keystore " +
-                                  path + ": " + ex.getMessage() );
+            String msg = sm.getString("jsse.keystore_load_failed", type, path,
+                    ex.getMessage());
+            log.error(msg);
+            throw new IOException(msg);
         } finally {
             if (istream != null) {
                 try {

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/jsse/res/LocalStrings.properties
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/jsse/res/LocalStrings.properties?rev=656035&r1=656034&r2=656035&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/net/jsse/res/LocalStrings.properties (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/jsse/res/LocalStrings.properties Tue May
13 15:32:17 2008
@@ -14,3 +14,4 @@
 # limitations under the License.
 
 jsse.alias_no_key_entry=Alias name {0} does not identify a key entry
+jsse.keystore_load_failed=Failed to load keystore type {0} with path {1} due to {2}



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message