Skip to content

Commit

Permalink
Add some hints in error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
gilles-duboscq committed Jun 2, 2024
1 parent 5ff47dd commit 8eae7a2
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,7 @@ public static Path getEspressoRuntime(TruffleLanguage.Env env) {
TruffleFile resource = env.getInternalResource("espresso-runtime-" + runtimeName);
if (resource == null) {
throw EspressoError.fatal("Couldn't find: espresso-runtime-" + runtimeName + " internal resource.\n" +
"Did you add the appropriate jar to the classpath?");
"Did you add the corresponding jar to the class or module path?");
}
Path resources = Path.of(resource.getAbsoluteFile().toString());
assert Files.isDirectory(resources);
Expand All @@ -656,8 +656,9 @@ public static Path getEspressoRuntime(TruffleLanguage.Env env) {
return Paths.get(System.getProperty("java.home"));
}
}
// TODO add potential remedies
throw EspressoError.fatal("Couldn't find suitable runtime libraries for espresso");
throw EspressoError.fatal("Couldn't find suitable runtime libraries for espresso. You can try to\n" +
"add a jar with the necessary resources such as org.graalvm.espresso:espresso-runtime-resources-*,\n" +
"or set java.JavaHome explicitly.");
} catch (IOException e) {
throw EspressoError.shouldNotReachHere(e);
}
Expand Down

0 comments on commit 8eae7a2

Please sign in to comment.