We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ac7a452 commit b0842dfCopy full SHA for b0842df
core/src/main/java/org/jruby/runtime/Helpers.java
@@ -1,5 +1,7 @@
1
package org.jruby.runtime;
2
3
+import java.io.EOFException;
4
+import java.io.FileNotFoundException;
5
import java.io.IOException;
6
import java.lang.reflect.Array;
7
@@ -199,6 +201,10 @@ public static Errno errnoFromException(Throwable t) {
199
201
// Try specific exception types by rethrowing and catching.
200
202
try {
203
throw t;
204
+ } catch (FileNotFoundException fnfe) {
205
+ return Errno.ENOENT;
206
+ } catch (EOFException fnfe) {
207
+ return Errno.EPIPE;
208
} catch (AtomicMoveNotSupportedException amnse) {
209
return Errno.EXDEV;
210
} catch (ClosedChannelException cce) {
0 commit comments