This came up in a discussion with a colleague today.
The Javadocs for Java\'s IllegalStateException state that it:
Signals that a method has b
I ran into this with:
try {
MessageDigest digest = MessageDigest.getInstance("SHA-1");
...
} catch (NoSuchAlgorithmException e) {
throw new AssertionError(e);
}
I think it will be impractical for me to throw IllegalStateException here in place of AssertionException even though this falls into the "the Java environment" category.