Skip to content

Commit

Permalink
Convert IOException to Ruby exception correctly
Browse files Browse the repository at this point in the history
Many libraries depend on us raising the actual Errno exceptions
for what comes out of Java as IOException. The utilities in JRuby
exist to convert these IOException objects into the appropriate
Errno exception by examining the exception type and message. This
patch switches one key place for jruby#242 to use this utility method.
  • Loading branch information
headius committed May 6, 2024
1 parent 71d03e1 commit a011807
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/org/jruby/ext/openssl/SSLSocket.java
Original file line number Diff line number Diff line change
Expand Up @@ -952,7 +952,7 @@ private IRubyObject syswriteImpl(final ThreadContext context,
}
catch (IOException ex) {
debugStackTrace(runtime, "SSLSocket.syswriteImpl", ex);
throw Utils.newError(runtime, runtime.getIOError(), ex);
throw runtime.newIOErrorFromException(ex);
}
}

Expand Down

0 comments on commit a011807

Please sign in to comment.