Expand description
Structured runtime errors (ISO error terms).
An error is carried as a relocatable ball (TermBuf) so it survives
the heap rewinding that unwinds to a catch frame, plus a
pre-rendered message for top-level output. The message format is
v1’s format_term rendering of the ball — byte-compatible with the
M2/M3 preformatted strings.
Functions§
- domain_
error domain_error(Domain, Culprit)- evaluation
evaluation_error(Kind)- existence_
procedure existence_error(procedure, Name/Arity)with v1’s exact context. Source provenance (SPANS.md Layer 3) comes fromm.error_site, appended byset_formal— the caller sets that around the raise.- instantiation
instantiation_error- resource
resource_error(Kind)— the steps variant is uncatchable (v1 rule).- set_
formal - Build
error(Formal, 'Context'), snapshot it, and setm.error. The formal term is built on the heap transiently and trimmed back. - throw_
term throw/1of an arbitrary user term: the ball IS the term; the top-level message is its rendering (v1 runner behavior).- type_
error type_error(Type, Culprit)