predicate and friends have been introduced before ISO compatible catch/3
exception handling for compatibility with some Prolog implementation.
The only feature not covered by catch/3
is the possibility to execute global cuts. New code should use catch/3
to deal with exceptions.
Execute Goal in a block. Label is the
name of the block. Label is normally an atom, but the system
imposes no type constraints and may even be a variable. ExitValue
is normally unified to the second argument of an exit/2
call invoked by Goal.
makes the innermost block which Label unifies
exit. The block's ExitValue is unified with Value.
If this unification fails the block fails.
makes the innermost block which Label unifies fail
immediately. Implemented as
fail(Label) :- !(Label), fail.
Cut all choice-points created since the entry of the innermost
block which Label unifies.