8204233: Add configurable option for enhanced socket IOException messages

Reviewed-by: alanb, chegar
This commit is contained in:
Michael McMahon 2018-06-22 18:10:20 +01:00
parent 7d4135b630
commit 1d79d38007
7 changed files with 269 additions and 8 deletions

View file

@ -37,6 +37,7 @@ import java.util.Set;
import sun.net.ConnectionResetException;
import sun.net.NetHooks;
import sun.net.ResourceManager;
import sun.net.util.SocketExceptions;
/**
* Default Socket Implementation. This implementation does
@ -415,7 +416,7 @@ abstract class AbstractPlainSocketImpl extends SocketImpl {
}
} catch (IOException e) {
close();
throw e;
throw SocketExceptions.of(e, new InetSocketAddress(address, port));
}
}