On Thu, 24 Oct 2024 08:10:25 GMT, Karm Michal Babacek <[email protected]> wrote:
>> You can change the CHECK_EXCEPTION_FATAL macro to something like
>>
>> #define CHECK_EXCEPTION_FATAL(env, message) \
>> if ((*env)->ExceptionCheck(env)) { \
>> (*env)->ExceptionDescribe(env);
>> (*env)->FatalError(env, message); \
>> }
>>
>> In this case the root cause of the bug will always be printed.
>> And then update the fatal message to some generic text.
>>
>> Note that the FatalError is used in this code since we always should load
>> the library(libawt_xawt or libawt_headless) or fail fast, otherwise we most
>> probably will get an error later.
>
> Thank you @mrserb for your time. Let me amend the PR and run tests again.
> You can change the CHECK_EXCEPTION_FATAL macro to something like
>
> ```
> #define CHECK_EXCEPTION_FATAL(env, message) \
> if ((*env)->ExceptionCheck(env)) { \
> (*env)->ExceptionDescribe(env);
> (*env)->FatalError(env, message); \
> }
> ```
>
> In this case the root cause of the bug will always be printed. And then
> update the fatal message to some generic text.
>
> Note that the FatalError is used in this code since we always should load the
> library(libawt_xawt or libawt_headless) or fail fast, otherwise we most
> probably will get an error later.
Hello @mrserb, would this be O.K. then?
[91d554f](https://github.com/openjdk/jdk/pull/20169/commits/91d554f4919a9923a304ec1d3b23b96cb5cf144a)
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20169#discussion_r1858718295