An existence error occurs when a predicate attempts to access something that does not exist. For example, trying to compile a file that does not exist, erasing a database reference that has already been erased.
The SICStus_Error term associated with an existence error is
existence_error(Goal, ArgNo, ObjectType, Culprit, Message)
'', or some additional information provided by the operating system or other support system indicating why Culprit is thought not to exist.
For example, ‘see('../brother/niece')’ might throw the exception
An existence error does not necessarily cause an exception to be thrown.
For I/O predicates,
the behavior can be controlled with the
fileerrors Prolog flag
(see ref-lps-flg) or with the
file_errors/1 option to
following values are possible:
on(fileerrors flag value)
error(absolute_file_name/3 fileerrors value)
off(fileerrors flag value)
fail(absolute_file_name/3 fileerrors value)