UnexpectedException is thrown to indicate that a checked exception was caught that was not expected to be thrown. For example, if a method declares that it throws MyException, but steps were taken in the calling code to ensure that MyException would not be thrown and MyException was nonetheless thrown, the calling code may throw an UnexpectedException. In other words, a statement throwing an UnexpectedException is essentially an assertion declaring that that line of code will not be reached.
@author Brad Kimmel
| |
| |
| |
| |
| |
| |
| |