To ensure that any exception is returned against the correct file object, the following handling occurs for file write requests to the presentation client.
The initial write request performed after the file is opened is forced to the presentation client and the result is returned. (This covers the situation where the initial write fails due to environmental access conditions and it forms the majority of write failures.)
Out-of-disk situations present the user with a message box, advising that the write failed and requesting that space be made available. The user can then click the Retry button to repeat the original operation without loss of data and without generating an exception.
If a write error occurs for any other situation or if the out-of-disk request is cancelled, the failure is reported against the next non-buffered request performed on that file, to ensure that the correct object is reported against in the generated exception.