Test runner: return-value error handling, no guard/cek-try/throws
guard and cek-try both create CEK frames that don't survive async perform/resume. Instead, run-action returns nil on success and an error string on failure. The for-each loop checks the return value and sets fail-msg. No exceptions cross async boundaries. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -999,7 +999,31 @@
|
||||
(hs-to-sx (nth ast 1))
|
||||
(hs-to-sx (nth ast 2)))))
|
||||
((= head (quote do))
|
||||
(cons (quote do) (map hs-to-sx (rest ast))))
|
||||
(let
|
||||
((compiled (map hs-to-sx (rest ast))))
|
||||
(if
|
||||
(and
|
||||
(> (len compiled) 1)
|
||||
(some
|
||||
(fn
|
||||
(c)
|
||||
(and
|
||||
(list? c)
|
||||
(or
|
||||
(= (first c) (quote hs-fetch))
|
||||
(= (first c) (quote hs-wait))
|
||||
(= (first c) (quote perform)))))
|
||||
compiled))
|
||||
(reduce
|
||||
(fn
|
||||
(body cmd)
|
||||
(list
|
||||
(quote let)
|
||||
(list (list (quote it) cmd))
|
||||
body))
|
||||
(nth compiled (- (len compiled) 1))
|
||||
(reverse (rest (reverse compiled))))
|
||||
(cons (quote do) compiled))))
|
||||
((= head (quote wait)) (list (quote hs-wait) (nth ast 1)))
|
||||
((= head (quote wait-for)) (emit-wait-for ast))
|
||||
((= head (quote log))
|
||||
|
||||
Reference in New Issue
Block a user