Skip to content

Commit

Permalink
Clean up exception messages in SSLSocket
Browse files Browse the repository at this point in the history
  • Loading branch information
edewata committed Jul 31, 2024
1 parent aafa19f commit c741bb2
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions base/src/main/java/org/mozilla/jss/ssl/SSLSocket.java
Original file line number Diff line number Diff line change
Expand Up @@ -1507,11 +1507,9 @@ int read(byte[] b, int off, int len)
try {
iRet = socketRead(b, off, len, base.getTimeout());
} catch (SocketTimeoutException ste) {
throw new SocketTimeoutException(
"SocketTimeoutException cannot read on socket: " + ste);
throw new SocketTimeoutException("Unable to read from socket: " + ste);
} catch (IOException ioe) {
throw new IOException(
"SocketException cannot read on socket: " + ioe.getMessage(), ioe);
throw new IOException("Unable to read from socket: " + ioe.getMessage(), ioe);
} finally {
synchronized (this) {
inRead = false;
Expand All @@ -1534,11 +1532,9 @@ void write(byte[] b, int off, int len)
try {
socketWrite(b, off, len, base.getTimeout());
} catch (SocketTimeoutException ste) {
throw new SocketTimeoutException(
"SocketTimeoutException cannot write on socket: " + ste);
throw new SocketTimeoutException("Unable to write to socket: " + ste);
} catch (IOException ioe) {
throw new IOException(
"SocketException cannot write on socket: " + ioe.getMessage(), ioe);
throw new IOException("Unable to write to socket: " + ioe.getMessage(), ioe);
} finally {
synchronized (this) {
inWrite = false;
Expand Down

0 comments on commit c741bb2

Please sign in to comment.