| 
| Stream is not a variable | 
   | 
type_error(variable, Stream) | 
 | 
| Atom is a variable | 
   | 
instantiation_error | 
 | 
| Chars is a partial list or a list with an element
E which is a variable | 
   | 
instantiation_error | 
 | 
| Codes is a partial list or a list with an element
E which is a variable | 
   | 
instantiation_error | 
 | 
| Atom is neither a variable nor a an atom | 
   | 
type_error(atom, Atom) | 
 | 
| Chars is neither a partial list nor a list | 
   | 
type_error(list, Chars) | 
 | 
| Codes is neither a partial list nor a list | 
   | 
type_error(list, Codes) | 
 | 
| an element E of the Chars list is neither a
variable nor a character | 
   | 
type_error(character, E) | 
 | 
| an element E of the Codes list is neither a
variable nor an integer | 
   | 
type_error(integer, E) | 
 | 
| an element E of the Codes list is an integer but
not a character code | 
   | 
representation_error(character_code) | 
 | 
 | 
| SorA is a variable | 
   | 
instantiation_error | 
 | 
| SorA is neither a variable nor a stream-term or alias | 
   | 
domain_error(stream_or_alias, SorA) | 
 | 
| SorA is not associated with an open stream | 
   | 
existence_error(stream, SorA) | 
 | 
| SorA is an output stream | 
   | 
permission_error(close, stream, SorA) | 
 | 
| SorA is a stream-term or alias but does not refer to a
constant term stream. | 
   | 
domain_error(term_stream_or_alias, SorA) | 
 | 
 | 
| SorA is a variable | 
   | 
instantiation_error | 
 | 
| Atom is neither a variable nor an atom | 
   | 
type_error(atom, Atom) | 
 | 
| Chars is neither a partial list nor a list | 
   | 
type_error(list, Chars) | 
 | 
| Codes is neither a partial list nor a list | 
   | 
type_error(list, Codes) | 
 | 
| SorA is neither a variable nor a stream-term or alias | 
   | 
domain_error(stream_or_alias, SorA) | 
 | 
| SorA is not associated with an open stream | 
   | 
existence_error(stream, SorA) | 
 | 
| SorA is an input stream | 
   | 
permission_error(close, stream, SorA) | 
 | 
| SorA is a stream-term or alias but does not refer to a
constant term stream | 
   | 
domain_error(term_stream_or_alias, SorA) | 
 |