Skip to main content

Module errors

Module errors 

Source
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 the format_term rendering of the ball.

Functions§

domain_error
domain_error(Domain, Culprit)
evaluation
evaluation_error(Kind)
existence_procedure
existence_error(procedure, Name/Arity). Source provenance (SPANS.md Layer 3) comes from m.error_site, appended by set_formal — the caller sets that around the raise.
instantiation
instantiation_error
resource
resource_error(Kind) — the steps variant is uncatchable.
set_formal
Build error(Formal, 'Context'), snapshot it, and set m.error. The formal term is built on the heap transiently and trimmed back.
throw_term
throw/1 of an arbitrary user term: the ball IS the term; the top-level message is its rendering.
type_error
type_error(Type, Culprit)