You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ExceptionNames.java 686B

1234567891011121314151617181920212223242526
  1. import org.aspectj.testing.Tester;
  2. // PR#125
  3. public class ExceptionNames {
  4. public static void main(String[] args) { test(); }
  5. public static void test() {
  6. String exception = "";
  7. java.lang.reflect.Method liveRoutine = null;
  8. try {
  9. liveRoutine.invoke(null,null);
  10. }
  11. catch (java.lang.reflect.InvocationTargetException e) {
  12. System.out.println(" " + e.getTargetException());
  13. exception = e.getClass().toString();
  14. }
  15. catch (Exception e) {
  16. exception = e.getClass().toString();
  17. }
  18. Tester.checkEqual(exception, "class java.lang.NullPointerException", "exception handled");
  19. }
  20. private void foo() {}
  21. }