Skip to content

Commit 8eae7a2

Browse files
Add some hints in error messages
1 parent 5ff47dd commit 8eae7a2

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

espresso/src/com.oracle.truffle.espresso/src/com/oracle/truffle/espresso/EspressoLanguage.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,7 @@ public static Path getEspressoRuntime(TruffleLanguage.Env env) {
634634
TruffleFile resource = env.getInternalResource("espresso-runtime-" + runtimeName);
635635
if (resource == null) {
636636
throw EspressoError.fatal("Couldn't find: espresso-runtime-" + runtimeName + " internal resource.\n" +
637-
"Did you add the appropriate jar to the classpath?");
637+
"Did you add the corresponding jar to the class or module path?");
638638
}
639639
Path resources = Path.of(resource.getAbsoluteFile().toString());
640640
assert Files.isDirectory(resources);
@@ -656,8 +656,9 @@ public static Path getEspressoRuntime(TruffleLanguage.Env env) {
656656
return Paths.get(System.getProperty("java.home"));
657657
}
658658
}
659-
// TODO add potential remedies
660-
throw EspressoError.fatal("Couldn't find suitable runtime libraries for espresso");
659+
throw EspressoError.fatal("Couldn't find suitable runtime libraries for espresso. You can try to\n" +
660+
"add a jar with the necessary resources such as org.graalvm.espresso:espresso-runtime-resources-*,\n" +
661+
"or set java.JavaHome explicitly.");
661662
} catch (IOException e) {
662663
throw EspressoError.shouldNotReachHere(e);
663664
}

0 commit comments

Comments
 (0)