Skip to content

Commit

Permalink
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -431,7 +431,8 @@ public int write(DynamicObject file, DynamicObject string) {
int written = posix().write(fd, buffer, buffer.remaining());

if (written == -1) {
throw new UnsupportedOperationException();
CompilerDirectives.transferToInterpreter();
throw new RaiseException(getContext().getCoreLibrary().errnoError(posix().errno(), this));
}

buffer.position(buffer.position() + written);

0 comments on commit f9e48bb

Please sign in to comment.