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 #242 to use this utility method.
  • Loading branch information
headius authored and kares committed May 27, 2024
1 parent 8847ce3 commit d8d67cd
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 @@ -951,7 +951,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 d8d67cd

Please sign in to comment.