Skip to content

Commit

Permalink
Improve error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
dnestoro committed May 23, 2024
1 parent 67dcd82 commit fdb7c00
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,9 @@ private void initializeMergerExecutable() throws MojoExecutionException {
String nativeImageConfigureFileName = nativeImageConfigureFileName();
File mergerExecutable = new File(nativeImageExecutable.getParentFile(), nativeImageConfigureFileName);
if (!mergerExecutable.exists()) {
throw new MojoExecutionException("'" + nativeImageConfigureFileName + "' tool was not found in the GraalVM JDK at '" + nativeImageExecutable.getParentFile().getParentFile() + "'." +
"This probably means that you are using a GraalVM distribution that is not fully supported by the Native Build Tools."
throw new MojoExecutionException("The '" + nativeImageConfigureFileName + "' tool was not found in the GraalVM JDK at '" + nativeImageExecutable.getParentFile().getParentFile() + "'." +
"This probably means that you are using a GraalVM distribution that is not fully supported by the Native Build Tools. " +
"Please try again, for example, with Oracle GraalVM or GraalVM Community Edition."
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,8 @@ public static Path getNativeImage(Logger logger) throws MojoExecutionException {
}

if (nativeImage == null) {
throw new RuntimeException("GraalVM native-image is missing on your system. " + System.lineSeparator() +
"Make sure that GRAALVM_HOME environment variable is present.");
throw new RuntimeException("The 'native-image' tool was not found on your system. " + System.lineSeparator() +
"Make sure that the JAVA_HOME or GRAALVM_HOME environment variables point to a GraalVM JDK, or that 'native-image' is on the system path.");
}

nativeImageExeCache = nativeImage;
Expand Down

0 comments on commit fdb7c00

Please sign in to comment.