Closed
Description
Sinks and sources created for files using FileSystem.sink
and FileSystem.source
may or may not throw an exception on close failure, depending on the platform.
For instance, on native platforms close(fd)
return code is ignored, and nothing will be reported in case of an error.
On the contrary, on JVM, File*Stream.close
may throw IOException
on a failed close operation.
Moreover, none of RawSink.close
and RawSource.close
mention that IOException could be thrown.
The behavior should be the same across all the targets. If the correct behavior is to throw an exception (which sounds reasonable to me), then RawSink/Source
kdoc may need to be updated.