Skip to content

Commit a011807

Browse files
committed
Convert IOException to Ruby exception correctly
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.
1 parent 71d03e1 commit a011807

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/org/jruby/ext/openssl/SSLSocket.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -952,7 +952,7 @@ private IRubyObject syswriteImpl(final ThreadContext context,
952952
}
953953
catch (IOException ex) {
954954
debugStackTrace(runtime, "SSLSocket.syswriteImpl", ex);
955-
throw Utils.newError(runtime, runtime.getIOError(), ex);
955+
throw runtime.newIOErrorFromException(ex);
956956
}
957957
}
958958

0 commit comments

Comments
 (0)