Skip to content

Commit d8d67cd

Browse files
headiuskares
authored andcommitted
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 8847ce3 commit d8d67cd

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -951,7 +951,7 @@ private IRubyObject syswriteImpl(final ThreadContext context,
951951
}
952952
catch (IOException ex) {
953953
debugStackTrace(runtime, "SSLSocket.syswriteImpl", ex);
954-
throw Utils.newError(runtime, runtime.getIOError(), ex);
954+
throw runtime.newIOErrorFromException(ex);
955955
}
956956
}
957957

0 commit comments

Comments
 (0)