RFR: JDK-8317603: provide handleSocketErrorWithMessage in windows Net.c for extended exception messages [v5]
Alan Bateman
alanb at openjdk.org
Mon Oct 9 18:41:03 UTC 2023
On Mon, 9 Oct 2023 11:54:55 GMT, Matthias Baesken <mbaesken at openjdk.org> wrote:
>> On Windows, we miss a handleSocketErrorWithMessage function that provides an additional message showing what went wrong in the Net.c coding. On Unix we have this function.
>> This leads sometimes to exceptions like
>>
>> MSG RTE: javax.naming.CommunicationException: example.com:1234 [Root exception is java.net.ConnectException: Connection timed out: no further information]
>>
>> see https://bugs.openjdk.org/browse/JDK-8317307
>>
>> It would be better to have a message explaining the reason instead of "no further information" .
>
> Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision:
>
> add missing quotation mark
src/java.base/windows/native/libnio/ch/DatagramChannelImpl.c line 92:
> 90: rv = connect((SOCKET)fd, &sa.sa, sa_len);
> 91: if (rv == SOCKET_ERROR) {
> 92: NET_ThrowNew(env, WSAGetLastError(), "connect");
Can you check the copyright date on this and the other files as some of these haven't been updated in a while.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16057#discussion_r1350680210
More information about the nio-dev
mailing list