about summary refs log tree commit diff stats
path: root/shell/print.mu
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2021-06-30 20:43:34 -0700
committerKartik K. Agaram <vc@akkartik.com>2021-06-30 20:43:34 -0700
commitc8fb6d6aca925b3043cc53b2b22e6b8cd462f056 (patch)
treefe27e547d16d6a22707ab9d0141887a0bc8b84e7 /shell/print.mu
parent49d60aa575bff129d3498d70b727dbe273ef3908 (diff)
downloadmu-c8fb6d6aca925b3043cc53b2b22e6b8cd462f056.tar.gz
clean up final abort in macroexpand
Diffstat (limited to 'shell/print.mu')
-rw-r--r--shell/print.mu9
1 files changed, 8 insertions, 1 deletions
diff --git a/shell/print.mu b/shell/print.mu
index 1f652fa5..6db5a25d 100644
--- a/shell/print.mu
+++ b/shell/print.mu
@@ -298,7 +298,14 @@ fn print-pair _in: (addr cell), out: (addr stream byte), trace: (addr trace) {
     {
       compare right-addr, 0
       break-if-!=
-      abort "NULL in print!"
+      {
+        var overflow?/eax: boolean <- try-write out, " ... NULL"
+        compare overflow?, 0/false
+        break-if-=
+        error trace, "print-pair: no space for ' ... NULL'"
+        return
+      }
+      return
     }
     {
       var right-nil?/eax: boolean <- nil? right-addr