• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Community
    • Proof-automation
    • ACL2
      • Theories
      • Rule-classes
      • Proof-builder
      • Recursion-and-induction
      • Hons-and-memoization
      • Events
      • Parallelism
      • History
      • Programming
      • Operational-semantics
      • Real
      • Start-here
      • Debugging
      • Miscellaneous
      • Output-controls
      • Macros
        • Make-event
        • Defmacro
        • Untranslate-patterns
        • Tc
        • Trans*
        • Macro-aliases-table
        • Macro-args
        • Defabbrev
        • User-defined-functions-table
        • Trans
        • Untranslate-for-execution
        • Add-macro-fn
        • Check-vars-not-free
        • Safe-mode
        • Macro-libraries
          • B*
          • Defunc
          • Fty
          • Apt
          • Std/util
          • Defdata
          • Defrstobj
          • Seq
          • Match-tree
          • Defrstobj
          • With-supporters
          • Def-partial-measure
          • Template-subst
          • Soft
          • Defthm-domain
          • Event-macros
            • Evmac-input-hints-p
            • Evmac-input-print-p
            • Function-definedness
            • Event-macro-input-processing
            • Event-macro-screen-printing
            • Make-event-terse
            • Event-macro-applicability-conditions
            • Event-macro-results
            • Template-generators
            • Event-macro-event-generators
            • Event-macro-proof-preparation
            • Try-event
            • Restore-output?
            • Restore-output
            • Fail-event
              • Cw-event
              • Event-macro-xdoc-constructors
              • Event-macro-intro-macros
            • Def-universal-equiv
            • Def-saved-obligs
            • With-supporters-after
            • Definec
            • Sig
            • Outer-local
            • Data-structures
          • Trans1
          • Defmacro-untouchable
          • Set-duplicate-keys-action
          • Add-macro-alias
          • Magic-macroexpand
          • Defmacroq
          • Trans!
          • Remove-macro-fn
          • Remove-macro-alias
          • Add-binop
          • Untrans-table
          • Trans*-
          • Remove-binop
          • Tcp
          • Tca
        • Mailing-lists
        • Interfacing-tools
      • Macro-libraries
        • B*
        • Defunc
        • Fty
        • Apt
        • Std/util
        • Defdata
        • Defrstobj
        • Seq
        • Match-tree
        • Defrstobj
        • With-supporters
        • Def-partial-measure
        • Template-subst
        • Soft
        • Defthm-domain
        • Event-macros
          • Evmac-input-hints-p
          • Evmac-input-print-p
          • Function-definedness
          • Event-macro-input-processing
          • Event-macro-screen-printing
          • Make-event-terse
          • Event-macro-applicability-conditions
          • Event-macro-results
          • Template-generators
          • Event-macro-event-generators
          • Event-macro-proof-preparation
          • Try-event
          • Restore-output?
          • Restore-output
          • Fail-event
            • Cw-event
            • Event-macro-xdoc-constructors
            • Event-macro-intro-macros
          • Def-universal-equiv
          • Def-saved-obligs
          • With-supporters-after
          • Definec
          • Sig
          • Outer-local
          • Data-structures
        • Interfacing-tools
        • Hardware-verification
        • Software-verification
        • Math
        • Testing-utilities
      • Event-macros

      Fail-event

      An event that always fails with a specified error context, flag, value, and message.

      This is realized by always generating a soft error (via er-soft+) during the expansion phase of make-event. The error context, flag, value, and message passed to this macro are not evaluated.

      The use of make-event-terse instead of make-event avoids any screen output other than the specified error message.

      This macro is used by try-event.

      Macro: fail-event

      (defmacro fail-event (ctx erp val msg)
       (declare (xargs :guard (msgp msg)))
       (cons
        'make-event-terse
        (cons
         (cons 'er-soft+
               (cons (cons 'quote (cons ctx 'nil))
                     (cons (cons 'quote (cons erp 'nil))
                           (cons (cons 'quote (cons val 'nil))
                                 (cons '"~@0"
                                       (cons (cons 'quote (cons msg 'nil))
                                             'nil))))))
         'nil)))