HARD-ERROR

(Hard-error ctx str alist) causes evaluation to halt with a short
message using the ``context'' ctx. An error message is first printed
using the string str and alist alist that are of the same kind
as expected by fmt. See fmt. Also see er for a macro that provides a
unified way of signaling errors.

Hard-error has a guard of t. Also see illegal for a
similar capability which however has a guard of nil that supports
static checking using guard verification, rather than using dynamic
(run-time) checking. This distinction is illustrated elsewhere:
see prog2$ for examples.

Semantically, hard-error ignores its arguments and always returns
nil. But if a call (hard-error ctx str alist) is encountered
during evaluation, then the string str is printed using the
association list alist (as in fmt), after which evaluation halts
immediately. Here is a trivial, contrived example.