Skip to content

Commit

Permalink
8267509: Improve IllegalAccessException message to include the cause …
Browse files Browse the repository at this point in the history
…of the exception

Backport-of: 36314a90c15e2ab2a9b32c2e471655c1b07d452c
  • Loading branch information
shipilev committed Nov 1, 2023
1 parent f4ed66e commit 1f75ab2
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1719,7 +1719,8 @@ MethodHandle setVarargs(MemberName member) throws IllegalAccessException {
try {
return this.withVarargs(true);
} catch (IllegalArgumentException ex) {
throw member.makeAccessException("cannot make variable arity", null);
throw new IllegalAccessException("cannot make variable arity: " + member +
" does not have a trailing array parameter");
}
}

Expand Down

1 comment on commit 1f75ab2

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.