Skip to content

Commit

Permalink
Improve error message.
Browse files Browse the repository at this point in the history
Fixes #521
  • Loading branch information
fniephaus committed Oct 18, 2023
1 parent 9c0fd8c commit a93bb33
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,15 @@ public static Path getJavaHomeNativeImage(String javaHomeVariable, Boolean failF
throw new MojoExecutionException("Determining GraalVM installation failed with message: " + e.getMessage());
}
} else if (failFast) {
throw new MojoExecutionException("'" + GU_EXE + "' tool was not found. This probably means that JDK at is not a GraalVM distribution.");
throw new MojoExecutionException("'" + GU_EXE + "' tool was not found in your " + javaHomeVariable + "." +
"This probably means that the JDK at '" + graalHomePath + "' is not a GraalVM distribution.");
}
}

if (!Files.exists(nativeImageExe)) {
if (failFast) {
throw new RuntimeException("native-image is not installed in your " + javaHomeVariable + "." +
"This probably means that JDK at is not a GraalVM distribution.");
"This probably means that the JDK at '" + graalHomePath + "' is not a GraalVM distribution.");
} else {
return null;
}
Expand Down

0 comments on commit a93bb33

Please sign in to comment.