Error and Warning Catalog

Stable diagnostics are indexed by phase and code so callers can distinguish reader, normalization, runtime, warning, and resource outcomes.

How to reason about it

  • E300–E340 cover unbound names, application, the number of arguments, assignment, pair/range/type/numeric faults, value contexts, letrec, user errors, exception flow, and stale escapes.
  • E1xx belongs to reader and static normalization, while W2xx and W3xx belong to ordered warnings.
  • ResourceLimit is deliberately outside catchable E3xx and is reported as its own outcome.

Stable runtime codes

CodeConditionPhase / catchability
E300 / E303unbound read / set! of unbound nameruntime / catchable
E301 / E302non-procedure application / wrong number of argumentsruntime / catchable
E310 / E311 / E312pair-list domain / range-index / primitive typeruntime / catchable
E313 / E314division by zero / non-finite productionruntime / catchable
E320 / E321value-count misuse / uninitialized letrec readruntime / catchable
E330 / E331 / E332user error / uncaught raise / non-continuable handler returnruntime / signal-specific
E340escape continuation no longer activeruntime / catchable fault after consumption
W330deprecated % call, so prefer moduloruntime warning / once per source call site
W331deprecated list-first or list-rest call, so prefer first or restruntime warning / once per source call site
ResourceLimitdeclared recursion/resource ceilingresource / not catchable as E3xx

A common mistake

Codes are stable contracts only where the one authoritative runtime definition pins them.

Keep going

The manual shows how to read a diagnostic in a running program, and the guide shows how a rule recovers from one.

Errors, Warnings, and Diagnostics · Handling Errors Deterministically