Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
8204256: improve jlink error message to report unsupported class file…
… format

Reviewed-by: mchung
  • Loading branch information
Ian Graves authored and Mandy Chung committed Oct 5, 2020
1 parent 4fe68f5 commit 5d84e95ed591692818c189e640d8884b4ebd8431
Showing 1 changed file with 8 additions and 4 deletions.
@@ -229,7 +229,7 @@ int run(String[] args) {
List<String> remaining = optionsHelper.handleOptions(this, args);
if (remaining.size() > 0 && !options.suggestProviders) {
throw taskHelper.newBadArgs("err.orphan.arguments",
remaining.stream().collect(Collectors.joining(" ")))
remaining.stream().collect(Collectors.joining(" ")))
.showUsage(true);
}
if (options.help) {
@@ -259,8 +259,8 @@ int run(String[] args) {
}

if (options.modulePath.isEmpty()) {
throw taskHelper.newBadArgs("err.modulepath.must.be.specified")
.showUsage(true);
throw taskHelper.newBadArgs("err.modulepath.must.be.specified")
.showUsage(true);
}
}

@@ -275,8 +275,12 @@ int run(String[] args) {
}

return EXIT_OK;
} catch (FindException e) {
log.println(taskHelper.getMessage("err.prefix") + " " + e.getMessage());
e.printStackTrace(log);
return EXIT_ERROR;
} catch (PluginException | IllegalArgumentException |
UncheckedIOException |IOException | FindException | ResolutionException e) {
UncheckedIOException |IOException | ResolutionException e) {
log.println(taskHelper.getMessage("error.prefix") + " " + e.getMessage());
if (DEBUG) {
e.printStackTrace(log);

0 comments on commit 5d84e95

Please sign in to comment.