- int Sferror(IOSTREAM 
*s)
- Returns TRUEif the stream is in an error condition,FALSEif the stream is valid and in normal condition and -1 
if the stream is invalid.
- void Sclearerr(IOSTREAM 
*s)
- Clear the error state of a stream. This includes the end-of-file state, 
pending warnings and errors and timeout.
- int Sseterr(IOSTREAM 
*s, int which, const char *message)
- Set an error or warning state on the stream. The which 
argument is one of SIO_WARNorSIO_FERR. This 
causes PL_release_stream() 
to print a message (SIO_WARN) or raise an exception (SIO_FERR).
- int Sset_exception(IOSTREAM 
*s, term_t ex)
- Associate a Prolog exception term with the stream or clear the 
associated exception if ex is 0 and set/clear the
SIO_FERRcondition on the stream. If an exception is 
assocated PL_release_stream() 
raises this exception.