< prev index next >

src/java.base/unix/native/libnet/SocketOutputStream.c

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

*** 1,7 **** /* ! * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 112,123 **** } if (errno == ECONNRESET) { JNU_ThrowByName(env, "sun/net/ConnectionResetException", "Connection reset"); } else { ! NET_ThrowByNameWithLastError(env, "java/net/SocketException", ! "Write failed"); } if (bufP != BUF) { free(bufP); } return; --- 112,123 ---- } if (errno == ECONNRESET) { JNU_ThrowByName(env, "sun/net/ConnectionResetException", "Connection reset"); } else { ! JNU_ThrowByNameWithMessageAndLastError ! (env, "java/net/SocketException", "Write failed"); } if (bufP != BUF) { free(bufP); } return;
< prev index next >