Skip to content

Commit f9e4a62

Browse files
committed
Improve ClassNotFoundException messages in classloading substitutions
1 parent 46124c8 commit f9e4a62

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

compiler/src/jdk.graal.compiler.libgraal/src/jdk/graal/compiler/libgraal/LibGraalSubstitutions.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,13 @@ static final class Target_java_lang_Class {
6868
@Substitute
6969
public static Class<?> forName(String name, boolean initialize, ClassLoader loader)
7070
throws ClassNotFoundException {
71-
throw new ClassNotFoundException(name);
71+
throw new ClassNotFoundException(name + " (class loading not supported in libgraal)");
7272
}
7373

7474
@Substitute
7575
private static Class<?> forName(String className, Class<?> caller)
7676
throws ClassNotFoundException {
77-
throw new ClassNotFoundException(className);
77+
throw new ClassNotFoundException(className + " (class loading not supported in libgraal)");
7878
}
7979

8080
@Substitute
@@ -95,7 +95,7 @@ public Set<String> getPackages() {
9595
static final class Target_java_lang_ClassLoader {
9696
@Substitute
9797
public Class<?> loadClass(String name) throws ClassNotFoundException {
98-
throw new ClassNotFoundException(name);
98+
throw new ClassNotFoundException(name + " (class loading not supported in libgraal)");
9999
}
100100

101101
@Substitute

0 commit comments

Comments
 (0)