From 10c5eed0c3b47547cdaa2c28fb36743ef4667349 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Tue, 13 Jan 2015 21:14:52 -0800 Subject: 554 - tedious to have to check for routine errors on every fork --- chessboard-cursor.arc.t | 4 ++++ chessboard-cursor.mu | 1 + mu.arc | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/chessboard-cursor.arc.t b/chessboard-cursor.arc.t index ddc9c0ad..e8f9d27f 100644 --- a/chessboard-cursor.arc.t +++ b/chessboard-cursor.arc.t @@ -26,7 +26,11 @@ (sleep until-routine-done:literal r:integer/routine) ]))) ;? (set dump-trace*) +;? (= dump-trace* (obj whitelist '("schedule" "run"))) (run 'main) +(each routine completed-routines* + (awhen rep.routine!error + (prn "error - " it))) (if (~ran-to-completion 'main) (prn "F - chessboard accepts legal moves (-)")) diff --git a/chessboard-cursor.mu b/chessboard-cursor.mu index 22c543df..af7dd273 100644 --- a/chessboard-cursor.mu +++ b/chessboard-cursor.mu @@ -178,6 +178,7 @@ (assert above-min:boolean (("rank too low" literal))) (below-max:boolean <- lesser-or-equal rank:integer 7:literal) (assert below-max:boolean (("rank too high" literal))) + (reply rank:integer) ]) (function expect-stdin [ diff --git a/mu.arc b/mu.arc index ee6f840d..c926da54 100644 --- a/mu.arc +++ b/mu.arc @@ -464,7 +464,7 @@ (pop-stack routine*) (if empty.routine* (return ninstrs)) (when (pos '<- (body.routine* pc.routine*)) - (die "No results returned: @(tostring:prn (body.routine* pc.routine*))")) + (die "No results returned: @(tostring:pr (body.routine* pc.routine*))")) (++ pc.routine*)) (++ curr-cycle*) ;? (trace "run" "-- " int-canon.memory*) -- cgit 1.4.1-2-gfad0