jdk/src/share/classes/sun/security/provider/SeedGenerator.java
changeset 10419 12c063b39232
parent 9035 1255eb81cc2f
child 16915 675d1569af3e
--- a/jdk/src/share/classes/sun/security/provider/SeedGenerator.java	Tue Aug 30 14:41:12 2011 +0100
+++ b/jdk/src/share/classes/sun/security/provider/SeedGenerator.java	Tue Aug 30 11:53:11 2011 -0700
@@ -151,7 +151,8 @@
         try {
             md = MessageDigest.getInstance("SHA");
         } catch (NoSuchAlgorithmException nsae) {
-            throw new InternalError("internal error: SHA-1 not available.");
+            throw new InternalError("internal error: SHA-1 not available."
+                    , nsae);
         }
 
         // The current time in millis
@@ -258,7 +259,8 @@
             try {
                 digest = MessageDigest.getInstance("SHA");
             } catch (NoSuchAlgorithmException e) {
-                throw new InternalError("internal error: SHA-1 not available.");
+                throw new InternalError("internal error: SHA-1 not available."
+                        , e);
             }
 
             final ThreadGroup[] finalsg = new ThreadGroup[1];
@@ -311,7 +313,8 @@
                             t.start();
                         } catch (Exception e) {
                             throw new InternalError("internal error: " +
-                                                    "SeedGenerator thread creation error.");
+                                                    "SeedGenerator thread creation error."
+                                    , e);
                         }
 
                         // We wait 250milli quanta, so the minimum wait time
@@ -344,7 +347,8 @@
                 }
             } catch (Exception e) {
                 throw new InternalError("internal error: " +
-                                        "SeedGenerator thread generated an exception.");
+                                        "SeedGenerator thread generated an exception."
+                        , e);
             }
         }
 
@@ -367,7 +371,8 @@
             } catch (Exception e) {
                 if (count <= 0)
                     throw new InternalError("internal error: " +
-                                            "SeedGenerator thread generated an exception.");
+                                            "SeedGenerator thread generated an exception."
+                            ,e);
             }
 
             synchronized(this) {
@@ -533,7 +538,7 @@
             } catch (IOException ioe) {
                 throw new InternalError("URLSeedGenerator " + deviceName +
                                         " generated exception: " +
-                                        ioe.getMessage());
+                                        ioe.getMessage(), ioe);
             }
         }