Quintus Prolog C functions return the following:
QP_SUCCESS
QP_FAILURE
QP_ERROR
In some error situations, a global variable, QP_errno
may also be set to
give more information about the error condition.
Those I/O related predicates that take a Prolog stream argument do not set
the error code in QP_errno
. Instead, they set the errno field of
the stream.
There are two QP_
functions provided to help diagnose error conditions
from error numbers:
QP_perror()
QP_errno
. This function is similar
to the system function perror(3)
.
QP_error_message()
In addition, the error number is sometimes reported in the message field of exception terms, as in
existence_error(Goal, _,_,_,errno(error number))
See mpg-ref-ove for a description of the conventions observed in the Reference Pages for Prolog predicates. C function Reference Pages differ primarily in the synopsis.