On Wed, 4 Dec 2024 04:53:08 GMT, Chris Plummer <[email protected]> wrote:
>> src/jdk.jdwp.agent/share/native/libjdwp/ModuleReferenceImpl.c line 56:
>>
>>> 54: JNI_FUNC_PTR(env,ExceptionClear)(env); // keep -Xcheck:jni happy
>>> 55: ERROR_MESSAGE(("JNI Exception occurred calling
>>> Module.getName()"));
>>> 56: EXIT_ERROR(AGENT_ERROR_JNI_EXCEPTION, NULL);
>>
>> Don't you want to report what the exception was?
>
> That might be nice, but we don't do it in other places where we have this
> pattern. This call should never fail, thus the "fatal error" approach.
Sure but when it does fail because of a bug the person trying to debug it will
lament the fact they don't know what exception was encountered. Seems a little
helper function could do the above and call `ExceptionDescribe`. Future RFE I
guess.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22528#discussion_r1868747644