[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-core-libs-dev
Subject:    RFR 8158023: SocketExceptions contain too little information sometimes
From:       "Langer, Christoph" <christoph.langer () sap ! com>
Date:       2016-05-27 8:29:34
Message-ID: decc19cdab854bbeac7126cb8e236f1e () DEWDFE13DE11 ! global ! corp ! sap
[Download RAW message or body]

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 SocketE=
xception 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... an=
d 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 rep=
laced 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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic