14.5. Errors during Input and Output
When an error occurs during an input or output operation, the function
or method called usually continues without interruption (the output method
returns a nonzero count). Depending on the nature of the operation, a program
has the option of raising the NOTREADY condition. The NOTREADY condition is
similar to the ERROR and FAILURE conditions associated with commands in that
it does not cause a terminating error if the condition is raised but is not
trapped. After NOTREADY has been raised, the following possibilities exist:
After the NOTREADY condition has been raised and is in DELAY state, the
"O" option of the CONDITION function
returns the stream object being processed when the stream error occurred.
The STATE method of the Stream
class returns the stream object state as
ERROR,
NOTREADY,
or
UNKNOWN. You can obtain additional
information by using the DESCRIPTION method of the Stream class.