Next: B-Prolog-specific Programming
Up: Error Handling
Previous: Error types
  Contents
  Index
The user can use exception_handler/3 to define his/her own
error handler. For example, the following clause makes the system
treat calls to an undefined predicate as fail:
exception_handler(undefined_predicate,_,fail).
When an error occurs, the system first executes the call:
exception_handler(Type,Goal,Handler)
If this call succeeds, the handler Handler defined by the user
is executed; otherwise, the default handler is executed.
Neng-Fa Zhou
1999-11-24