feat(errors): typed conditions + REPL report-and-continue (ERRORS.md P1-P2)Verified
Errors at the REPL no longer kill the process. Each form is wrapped in a handler-case that prints '; Error: <message>' and returns to the prompt. Condition model: a typed cons (TYPE-KEYWORD REPORT-BV . SLOTS) — no new widetag, GC already traces conses. condition-type/condition-report accessors + constructors (make-simple-error, make-program-error, make-undefined-function-error, make-type-error, make-division-by-zero, make-bounds-error) build pre-rendered messages via format. A raw bv from (error "str") stays valid (report = itself, type = :simple-error). The gc-raise-condition no-handler trampoline fallback now extracts and prints a typed condition's REPORT (cadr), guarded so a raw bv falls through and a malformed (error '(x)) can't deref garbage. No compiler-state rollback in the handler: every trigger signals at runtime, after the form has finished compiling/publishing, so the longjmp lands with consistent state (per codex review). Verified: (error "boom") then (+ 1 2) prints '; Error: boom' then 3; typed objects report exactly, e.g. 'invalid number of arguments: BAR expected 2, got 1'. Full suite 202/202, fixed point + witness green. Constructors listed in cold-bootstrap-retained.lisp (asm/warm-only callers, invisible to cold's static analyzer). ERRORS.md tracks phases. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By:
Claude Opus 4.8 (1M context) <noreply@anthropic.com>