- try {
- p("ArithmeticException (only w/ -softnull):");
- long i = 1, j = 0, k = i / j;
- failed();
- } catch (ArithmeticException e) {
- String msg = e.getMessage();
-
- if (msg == null || !msg.equals("/ by zero")) {
- pln("FAILED: wrong message: " + msg + ", should be: / by zero");
-
- } else {
- ok();
- pstacktrace(e);
- }
- }
-
-