The built-in predicates that open files simply fail, instead of raising an exception if the specified file cannot be opened.
fileerrors flag is only enabled by an
explicit call to
fileerrors/0, or via
which can also be used to obtain the current value of the
flag. See ref-lps-ove, for more information on the
nofileerrors is a drastic predicate, since it
affects the use of all predicates that open files. You might be
unintentionally changing the behaviour of calls to
other parts of the system (written by other people or from libraries).
A better way to detect and ignore file errors is to wrap specific
on_exception/3 and ignore the types of
errors you want to ignore.