RFR: JDK-8298170 : Introduce a macro for exception check, free and return

Thomas Stuefe stuefe at openjdk.org
Wed Dec 7 16:45:02 UTC 2022


On Wed, 7 Dec 2022 16:27:43 GMT, Roger Riggs <rriggs at openjdk.org> wrote:

> 
> Good idea, though perhaps the return (and value if any) could be explicit in the macro invocation, instead of implicit (plus arg). A single macro would suffice, instead of multiples.
> 
> Usage Example:
> 
> ```
>     JNU_CHECK_EXCEPTION_DO(env, { 
>              free(tab); 
>              return;
>            })
> ```

Neat. I like that.

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

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


More information about the core-libs-dev mailing list