• Places
    • Home
    • Graphs
    • Prefixes
  • Admin
    • Users
    • Settings
    • Plugins
    • Statistics
  • CPACK
    • Home
    • List packs
    • Submit pack
  • Repository
    • Load local file
    • Load from HTTP
    • Load from library
    • Remove triples
    • Clear repository
  • Query
    • YASGUI SPARQL Editor
    • Simple Form
    • SWISH Prolog shell
  • Help
    • Documentation
    • Tutorial
    • Roadmap
    • HTTP Services
  • Login

4.8 Meta-Call Predicates
All Application Manual Name SummaryHelp

  • Documentation
    • Reference manual
      • Built-in Predicates
        • Meta-Call Predicates
          • call/1
          • call/2
          • apply/2
          • not/1
          • once/1
          • ignore/1
          • call_with_depth_limit/3
          • call_with_inference_limit/3
          • setup_call_cleanup/3
          • setup_call_catcher_cleanup/4
          • call_cleanup/2
          • undo/1
    • Packages
Availability:built-in
Sourcesetup_call_catcher_cleanup(:Setup, :Goal, +Catcher, :Cleanup)
Similar to setup_call_cleanup(Setup, Goal, Cleanup) with additional information on the reason for calling Cleanup. Prior to calling Cleanup, Catcher unifies with the termination code (see below). If this unification fails, Cleanup is not called.
exit
Goal succeeded without leaving any choice points.
fail
Goal failed.
!
Goal succeeded with choice points and these are now discarded by the execution of a cut (or other pruning of the search tree such as if-then-else).
exception(Exception)
Goal raised the given Exception.
external_exception(Exception)
Goal succeeded with choice points and these are now discarded due to an exception. For example:
?- setup_call_catcher_cleanup(true, (X=1;X=2),
                              Catcher, writeln(Catcher)),
   throw(ball).
external_exception(ball)
ERROR: Unhandled exception: Unknown message: ball

ClioPatria (version V3.1.1-51-ga0b30a5)