| Modifier and Type | Field and Description |
|---|---|
| private static final long |
| Access | Constructor and Description |
|---|---|
| public | AssertionFailedException(Exception
the exception that should never have been thrown. ex)Creates an AssertionFailedException for the given exception that should never have been thrown. |
| public | AssertionFailedException(String
a description of the assertion that failed assertion)Creates an AssertionFailedException for the reason given. |
| Modifier and Type | Method and Description |
|---|---|
| public static AssertionFailedException | Returns: AssertionFailedExceptionthe exception that should never have been thrown. ex)Convenience method. |
| public static AssertionFailedException | Returns: the exception. exception should be thrown by the caller to satisfy compiler checks for data-flow, etcmessage assertion)Create (and caller should subsequently throw) an |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| AssertionFailedException | back to summary |
|---|---|
| public AssertionFailedException(Exception ex) Creates an AssertionFailedException for the given exception that should never have been thrown.
| |
| AssertionFailedException | back to summary |
|---|---|
| public AssertionFailedException(String assertion) Creates an AssertionFailedException for the reason given.
| |
| shouldNotHappen | back to summary |
|---|---|
| public static AssertionFailedException shouldNotHappen(Exception ex) throws AssertionFailedException Convenience method.
| |
| shouldNotHappen | back to summary |
|---|---|
| public static AssertionFailedException shouldNotHappen(String assertion) throws AssertionFailedException Create (and caller should subsequently throw) an Typical use is as follows:
if (something == null) {
throw AssertionFailedException.shouldNotHappen("Something cannot be null");
}
| |