; test_error.lisp — runtime errors. Each form should produce ; `error: ` on stderr; the REPL keeps going and prints ; surviving results on stdout. ; ; Run: cat test_error.lisp | ./lisp undefined-symbol ; error: unbound symbol (car 1) ; error: car: not a pair (cdr '()) ; error: cdr: not a pair (/ 5 0) ; error: divide by zero (mod 7 0) ; error: mod by zero (+ 'a 'b) ; error: expected number (car) ; error: car: need 1 arg (cons 1) ; error: cons: need 2 args ; sanity: the REPL recovers — these should print normally. (+ 1 2) ; => 3 "still alive" ; => "still alive"