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