about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-01-13 21:14:52 -0800
committerKartik K. Agaram <vc@akkartik.com>2015-01-13 21:18:39 -0800
commit10c5eed0c3b47547cdaa2c28fb36743ef4667349 (patch)
tree28ead154287bc6093e20c54317fdbdb3fe99627d
parent32aa234de62cea36b8ab24de66b7088b7f3d23d1 (diff)
downloadmu-10c5eed0c3b47547cdaa2c28fb36743ef4667349.tar.gz
554 - tedious to have to check for routine errors on every fork
-rw-r--r--chessboard-cursor.arc.t4
-rw-r--r--chessboard-cursor.mu1
-rw-r--r--mu.arc2
3 files changed, 6 insertions, 1 deletions
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 (<rank><file>-<rank><file>)"))
 
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*)