Fix 14 wave-4 re-review findings (batches w4a+w4b)

This commit is contained in:
venomade committed 2026-11-22 12:23:01 +00:00
1 parent a28a35991f
commit fd5e11cdeb
23 files changed
+98 -29

No files matched your search

+4 -1
View File
@@ -4,4 +4,7 @@ Conditions, handlers, restarts: the crown jewel of Common Lisp.
ERROR signals, HANDLER-CASE catches, UNWIND-PROTECT cleans up.
DEFINE-CONDITION makes your own error types, and restarts let the
recovery happen exactly where it makes sense.
recovery happen exactly where it makes sense. :REPORT words a
condition for humans, WARN and SIGNAL carry on instead of
unwinding, restarts can take arguments, and IGNORE-ERRORS swaps an
error for NIL.
+7
View File
@@ -46,8 +46,15 @@
(empty-cart (c) (format nil "~a" c))))
(check-equal '(battery 15) (battery-check 15))
(check-equal '(battery 90) (battery-check 90))
(check-equal :noticed (handler-case (battery-check 15)
(warning () :noticed)))
(check-equal :noticed (handler-case (warn "battery low")
(warning () :noticed)))
(check-equal :swapped (handler-case (check-battery 5)
(low-battery () :swapped)))
(check-equal '(battery 20) (check-battery 20))
(check-equal :swapped (handler-case (check-battery 10)
(low-battery () :swapped)))
(check-equal '(battery 11)
(handler-case (check-battery 11)
(low-battery () :leaked)))