Skip to content

Commit

Permalink
init fix
Browse files Browse the repository at this point in the history
  • Loading branch information
LuciferYang committed Oct 22, 2023
1 parent c5d19d0 commit 8d82c96
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,14 @@ public static CryptoRandom getCryptoRandom(final Properties props)
} catch (final Exception e) {
lastException = e;
errorMessage.append("CryptoRandom: [" + className + "] failed with " + e.getMessage());
} catch (final ExceptionInInitializerError initializerError) {
Throwable t = initializerError.getException();
if (t isinstanceof Exception) {
lastException = (Exception) t;
errorMessage.append("CryptoRandom: [" + className + "] initialization failed with " + t.getMessage());
} else {
throw initializerError;
}
}
}

Expand Down

0 comments on commit 8d82c96

Please sign in to comment.