nofileerrors/0

Synopsis

nofileerrors

Disables the fileerrors flag

Description

The built-in predicates that open files simply fail, instead of raising an exception if the specified file cannot be opened.

The fileerrors flag is only enabled by an explicit call to fileerrors/0, or via prolog_flag/[2,3], which can also be used to obtain the current value of the fileerrors flag. See ref-lps-ove, for more information on the fileerrors flag.

Tips

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 open/3 from 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 calls to open/3 with on_exception/3 and ignore the types of errors you want to ignore.

See Also

fileerrors/0, prolog_flag/[2,3]