Ping - RFR 8158023: SocketExceptions contain too little information sometimes
Langer, Christoph
christoph.langer at sap.com
Wed Jun 1 06:49:53 UTC 2016
Hi,
ping - any comments on this?
Thanks
Christoph
From: Langer, Christoph
Sent: Freitag, 27. Mai 2016 10:30
To: net-dev at openjdk.java.net
Cc: core-libs-dev at openjdk.java.net; nio-dev at openjdk.java.net
Subject: RFR 8158023: SocketExceptions contain too little information sometimes
Hi all,
please review the following change:
Webrev: http://cr.openjdk.java.net/~clanger/webrevs/8158023.1/
Bug: https://bugs.openjdk.java.net/browse/JDK-8158023
During error analysis I stumbled over a place where I encountered a SocketException which was thrown along with some strerror information as message. I found it hard to find the originating code spot with that information.
So I looked at the places where we throw exceptions, namely JNU_Throw... and NET_Throw... functions and came up with the following enhancement:
- NET_ThrowByNameWithLastError can go completely as it does not provide any benefit over JNU_ThrowByNameWithLastError.
- JNU_ThrowByNameWithLastError can be cleaned up.
- I added JNU_ThrowByNameWithMessageAndLastError to print out a string like message + ": " + last error.
- I went over all places where NET_ThrowByNameWithLastError is used and replaced it appropriately.
Do you think this change is desirable/possible?
Though it's mainly a net topic, I'm posting it to nio-dev and core-libs-dev as well as JNU_Throw... code affects all.
Best regards
Christoph
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/net-dev/attachments/20160601/db3e05d9/attachment-0001.html>
More information about the net-dev
mailing list