about summary refs log tree commit diff stats
path: root/shell/sandbox.mu
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2021-05-18 19:48:41 -0700
committerKartik K. Agaram <vc@akkartik.com>2021-05-18 20:01:11 -0700
commit837926751a5bc1abe60cb49e8b5243705c6591da (patch)
tree65171df0bbb9e5007fa586d501c64528defc1bcc /shell/sandbox.mu
parent6934436de9ba93eb27a9101bc61c85cbb814f776 (diff)
downloadmu-837926751a5bc1abe60cb49e8b5243705c6591da.tar.gz
shell: add a lot of error-checking
Diffstat (limited to 'shell/sandbox.mu')
-rw-r--r--shell/sandbox.mu6
1 files changed, 6 insertions, 0 deletions
diff --git a/shell/sandbox.mu b/shell/sandbox.mu
index 737723b9..1625125d 100644
--- a/shell/sandbox.mu
+++ b/shell/sandbox.mu
@@ -610,6 +610,12 @@ fn run _in-ah: (addr handle gap-buffer), out: (addr stream byte), globals: (addr
     return
   }
   macroexpand read-result-ah, globals, trace
+  var error?/eax: boolean <- has-errors? trace
+  {
+    compare error?, 0/false
+    break-if-=
+    return
+  }
   var nil-h: (handle cell)
   var nil-ah/eax: (addr handle cell) <- address nil-h
   allocate-pair nil-ah