A.14 library(debug): Print debug messages and test assertions
AllApplicationManualNameSummaryHelp

  • Documentation
    • Reference manual
      • The SWI-Prolog library
        • library(debug): Print debug messages and test assertions
          • debugging/1
          • debugging/2
          • debug/1
          • nodebug/1
          • list_debug_topics/0
          • debug_message_context/1
          • debug/3
          • debug_print_hook/3
          • assertion/1
          • assertion_failed/2
    • Packages
[semidet,multifile]prolog:assertion_failed(+Reason, +Goal)
This hook is called if the Goal of assertion/1 fails. Reason is unified with either fail if Goal simply failed or an exception call otherwise. If this hook fails, the default behaviour is activated. If the hooks throws an exception it will be propagated into the caller of assertion/1.