4.6.7.2 Exceptions Related to Streams
All predicates that take a stream argument will raise the following
exceptions:
instantiation_error
- Stream argument is not ground
type_error
- Stream is not an input (or output) stream type.
existence_error
- Stream is syntactically valid but does not name an open stream.
permission_error
- Stream names an open stream but the stream is not open for the
required operation, or has reached the end of stream on input,
or is binary when text is required, or vice versa.
The reference page for each stream predicate will simply refer to
these as “Stream errors” and will go on to detail other exceptions
that may be raised for a particular predicate.
Send feedback on this subject.