1. static void test() throws Error {2.   if (true) throw new AssertionError();3.   System.out.print("test ");4. }5. public static void main(String[] args) {6.   try { test(); }7. catch (Exception ex) { System.out.print("exception "); }8. System.out.print("end ");9. }