| | 128 | |
| | 129 | /** |
| | 130 | * Can be called if an assertion already failed. This can be used at |
| | 131 | * code positions that should never be reached at all. It throws |
| | 132 | * an AssertionFailedException with the given message. |
| | 133 | * |
| | 134 | * @param message The message to be used in the exception. |
| | 135 | * @throws AssertionFailedException always. |
| | 136 | */ |
| | 137 | public static void fail (String message) |
| | 138 | throws AssertionFailedException |
| | 139 | { |
| | 140 | throw new AssertionFailedException(message); |
| | 141 | } |
| | 142 | |
| | 143 | /** |
| | 144 | * Can be called if an exception is unexpectedly caught. This can |
| | 145 | * be used at catch blocks that should never be reached at all. |
| | 146 | * It throws an AssertionFailedException with the given nested |
| | 147 | * exception. |
| | 148 | * |
| | 149 | * @param ex the exception that was not expected |
| | 150 | * @throws UnexpectedExceptionException always. |
| | 151 | */ |
| | 152 | // public static void fail (Throwable ex) |
| | 153 | // throws UnexpectedException |
| | 154 | // { |
| | 155 | // throw new UnexpectedExceptionException(ex); |
| | 156 | // } |