unknown/2
unknown(
-OldAction, +NewAction)
Unifies OldAction with the current action on unknown procedures, and then sets the current action to NewAction.
[error,fail]
[error,fail]
This action determines what happens when an undefined predicate is called:
error
fail
The default action is error
. trace
is accepted as a synonym for
error
for backword compatibility. Note that
| ?- unknown(Action, Action).
just returns Action without changing it.
Procedures that are known to be dynamic just fail when there
are no clauses for them. Their behavior is not affected by
unknown/2
. For more information on dynamic procedures, see
ref-mdb-dsp.
unknown_predicate_handler/3