public class org.graalvm.tools.insight.test.InsightExceptionTest
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: org.graalvm.tools.insight.test.InsightExceptionTest
super_class: java.lang.Object
{
private static java.lang.reflect.Method raiseMethod;
descriptor: Ljava/lang/reflect/Method;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
public void <init>();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokespecial java.lang.Object.<init>:()V
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/graalvm/tools/insight/test/InsightExceptionTest;
public static void initRaiseMethod();
descriptor: ()V
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=6, locals=1, args_size=0
0: ldc "com.oracle.truffle.tools.agentscript.impl.InsightException"
invokestatic java.lang.Class.forName:(Ljava/lang/String;)Ljava/lang/Class;
astore 0
start local 0 1: aload 0
ldc "raise"
iconst_1
anewarray java.lang.Class
dup
iconst_0
ldc Ljava/lang/Exception;
aastore
invokevirtual java.lang.Class.getDeclaredMethod:(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
putstatic org.graalvm.tools.insight.test.InsightExceptionTest.raiseMethod:Ljava/lang/reflect/Method;
2: getstatic org.graalvm.tools.insight.test.InsightExceptionTest.raiseMethod:Ljava/lang/reflect/Method;
iconst_1
invokevirtual java.lang.reflect.Method.setAccessible:(Z)V
3: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
1 4 0 insightException Ljava/lang/Class<*>;
Exceptions:
throws java.lang.Exception
RuntimeVisibleAnnotations:
org.junit.BeforeClass()
public void raiseNPE();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=7, locals=4, args_size=1
start local 0 0: getstatic org.graalvm.tools.insight.test.InsightExceptionTest.raiseMethod:Ljava/lang/reflect/Method;
aconst_null
iconst_1
anewarray java.lang.Object
dup
iconst_0
new java.lang.NullPointerException
dup
invokespecial java.lang.NullPointerException.<init>:()V
aastore
invokevirtual java.lang.reflect.Method.invoke:(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
pop
1: ldc "Should raise an exception"
invokestatic org.junit.Assert.fail:(Ljava/lang/String;)V
2: goto 9
StackMap locals:
StackMap stack: java.lang.reflect.InvocationTargetException
3: astore 1
start local 1 4: aload 1
invokevirtual java.lang.reflect.InvocationTargetException.getTargetException:()Ljava/lang/Throwable;
astore 2
start local 2 5: aload 2
invokestatic org.junit.Assert.assertNotNull:(Ljava/lang/Object;)V
6: aload 2
invokevirtual java.lang.Throwable.getMessage:()Ljava/lang/String;
astore 3
start local 3 7: aload 3
invokestatic org.junit.Assert.assertNotNull:(Ljava/lang/Object;)V
8: aload 3
aload 3
ldc "insight: Unexpected NullPointerException"
invokevirtual java.lang.String.startsWith:(Ljava/lang/String;)Z
invokestatic org.junit.Assert.assertTrue:(Ljava/lang/String;Z)V
end local 3 end local 2 end local 1 9: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 10 0 this Lorg/graalvm/tools/insight/test/InsightExceptionTest;
4 9 1 invEx Ljava/lang/reflect/InvocationTargetException;
5 9 2 ex Ljava/lang/Throwable;
7 9 3 msg Ljava/lang/String;
Exception table:
from to target type
0 2 3 Class java.lang.reflect.InvocationTargetException
Exceptions:
throws java.lang.Exception
RuntimeVisibleAnnotations:
org.junit.Test()
public void raisePatternException();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=6, locals=4, args_size=1
start local 0 0: ldc "(unclosed"
invokestatic java.util.regex.Pattern.compile:(Ljava/lang/String;)Ljava/util/regex/Pattern;
pop
1: goto 4
StackMap locals:
StackMap stack: java.util.regex.PatternSyntaxException
2: astore 1
start local 1 3: getstatic org.graalvm.tools.insight.test.InsightExceptionTest.raiseMethod:Ljava/lang/reflect/Method;
aconst_null
iconst_1
anewarray java.lang.Object
dup
iconst_0
aload 1
aastore
invokevirtual java.lang.reflect.Method.invoke:(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
pop
end local 1 4: StackMap locals:
StackMap stack:
ldc "Should raise an exception"
invokestatic org.junit.Assert.fail:(Ljava/lang/String;)V
5: goto 12
StackMap locals:
StackMap stack: java.lang.reflect.InvocationTargetException
6: astore 1
start local 1 7: aload 1
invokevirtual java.lang.reflect.InvocationTargetException.getTargetException:()Ljava/lang/Throwable;
astore 2
start local 2 8: aload 2
invokestatic org.junit.Assert.assertNotNull:(Ljava/lang/Object;)V
9: aload 2
invokevirtual java.lang.Throwable.getMessage:()Ljava/lang/String;
astore 3
start local 3 10: aload 3
invokestatic org.junit.Assert.assertNotNull:(Ljava/lang/Object;)V
11: aload 3
aload 3
ldc "insight: Unclosed group near index 9: (unclosed"
invokevirtual java.lang.String.startsWith:(Ljava/lang/String;)Z
invokestatic org.junit.Assert.assertTrue:(Ljava/lang/String;Z)V
end local 3 end local 2 end local 1 12: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 13 0 this Lorg/graalvm/tools/insight/test/InsightExceptionTest;
3 4 1 ex Ljava/util/regex/PatternSyntaxException;
7 12 1 invEx Ljava/lang/reflect/InvocationTargetException;
8 12 2 ex Ljava/lang/Throwable;
10 12 3 msg Ljava/lang/String;
Exception table:
from to target type
0 1 2 Class java.util.regex.PatternSyntaxException
0 5 6 Class java.lang.reflect.InvocationTargetException
Exceptions:
throws java.lang.Exception
RuntimeVisibleAnnotations:
org.junit.Test()
}
SourceFile: "InsightExceptionTest.java"