< prev index next >

src/java.base/windows/native/libnet/Inet6AddressImpl.c

Print this page
rev 14618 : 8158023: SocketExceptions contain too little information sometimes

*** 106,116 **** error = getaddrinfo(hostname, NULL, &hints, &res); if (error) { if (WSAGetLastError() == WSATRY_AGAIN) { ! NET_ThrowByNameWithLastError(env, JNU_JAVANETPKG "UnknownHostException", hostname); JNU_ReleaseStringPlatformChars(env, host, hostname); return NULL; } else { --- 106,116 ---- error = getaddrinfo(hostname, NULL, &hints, &res); if (error) { if (WSAGetLastError() == WSATRY_AGAIN) { ! JNU_ThrowByNameWithLastError(env, JNU_JAVANETPKG "UnknownHostException", hostname); JNU_ReleaseStringPlatformChars(env, host, hostname); return NULL; } else {
*** 405,415 **** closesocket(fd); return JNI_FALSE; } if (WSAGetLastError() != WSAEWOULDBLOCK) { ! NET_ThrowByNameWithLastError(env, JNU_JAVANETPKG "ConnectException", "connect failed"); WSACloseEvent(hEvent); closesocket(fd); return JNI_FALSE; } --- 405,415 ---- closesocket(fd); return JNI_FALSE; } if (WSAGetLastError() != WSAEWOULDBLOCK) { ! JNU_ThrowByNameWithLastError(env, JNU_JAVANETPKG "ConnectException", "connect failed"); WSACloseEvent(hEvent); closesocket(fd); return JNI_FALSE; }
< prev index next >