On Mon, 1 Jul 2024 21:48:44 GMT, Chen Liang <li...@openjdk.org> wrote:

> `Method.invoke` and `Constructor.newInstance` wraps `Error` in 
> `InvocationTargetException`, which is bug-prone for users. Worse, this is 
> only ambiguously mentioned in the API specification.
> 
> This patch proposes to explicitly mention that `InvocationTargetException` 
> wraps any throwable, and adds an API notes section describing the risk of not 
> handling `InvocationTargetException` (and thereby ignoring the wrapped 
> errors), to advise against future user errors.

This pull request has been closed without being integrated.

-------------

PR: https://git.openjdk.org/jdk/pull/19980

Reply via email to