RFR: JDK-8299475: Enhance SocketException by cause where it is missing in net and nio area [v2]

Matthias Baesken mbaesken at openjdk.org
Tue Jan 3 10:27:48 UTC 2023


On Tue, 3 Jan 2023 09:14:11 GMT, Alan Bateman <alanb at openjdk.org> wrote:

>> Hi Alan, createImpl  throws SocketException anyway, so can't we just remove the catch completely in this case ?
>> Or are there other IOExceptions?
>
> Our SocketImpls mostly throw SocketException so inserting the catch of SocketException will avoid the translation for most cases.

Replacing the IOException does not work, this even leads to a compile error " unreported exception IOException" ; so I guess the catch (SocketException e)  needs to be added to the IOException ; not so nice.

-------------

PR: https://git.openjdk.org/jdk/pull/11813


More information about the net-dev mailing list