[foreign-memaccess+abi] RFR: 8267989: Exceptions thrown during upcalls should be handled [v2]
Jorn Vernee
jvernee at openjdk.java.net
Tue Jun 1 09:53:29 UTC 2021
On Mon, 31 May 2021 21:12:48 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
>> Jorn Vernee has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Address review comments:
>> - tweak documentation
>> - remove system property
>> - simplify test & check stderr for stack trace message
>
> src/jdk.incubator.foreign/share/classes/jdk/incubator/foreign/CLinker.java line 119:
>
>> 117: * @see CLinker#upcallStub(MethodHandle, FunctionDescriptor, ResourceScope)
>> 118: */
>> 119: int ERR_UNCAUGHT_EXCEPTION = 1;
>
> On a second thought, I'm not super sure of the value of documenting what the exit code should be? Maybe we can leave that unspecified?
I agree. Without a system property, having a constant doesn't really make sense. I looked around in the documentation of exit codes in the JDK, and most places seem to at least specify the exit code to be non-zero in case of error. I'll add a note like that to the documentation of upcallStub.
-------------
PR: https://git.openjdk.java.net/panama-foreign/pull/543
More information about the panama-dev
mailing list