about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2021-11-09 07:30:44 -0800
committerKartik K. Agaram <vc@akkartik.com>2021-11-09 07:30:44 -0800
commitd1808995b2c6b99749237a29e6ac6477d00ff8f9 (patch)
treef21aff05c07c09d7c8d0d6e9660e0ffe1b2777b1
parenta459208291ffea063cd532cf2ab5b6adf27d80b7 (diff)
downloadmu-d1808995b2c6b99749237a29e6ac6477d00ff8f9.tar.gz
copy back some error messages from linux/
-rw-r--r--403unicode.mu4
-rw-r--r--linux/403unicode.mu2
2 files changed, 3 insertions, 3 deletions
diff --git a/403unicode.mu b/403unicode.mu
index 73f44a58..e1bfba3f 100644
--- a/403unicode.mu
+++ b/403unicode.mu
@@ -136,10 +136,10 @@ fn to-grapheme in: code-point -> _/eax: grapheme {
       break $to-grapheme:compute-length
     }
     # more than 4 bytes: unsupported
-    # TODO: print error message to stderr
     compare c, 0x1fffff
     {
       break-if->
+      abort "unsupported code point"
       return 0
     }
   }
@@ -276,7 +276,7 @@ fn read-grapheme in: (addr stream byte) -> _/eax: grapheme {
       num-trailers <- copy 3
       break $read-grapheme:compute-length
     }
-    # TODO: print error message
+    abort "utf-8 encodings larger than 4 bytes are not yet supported"
     return 0
   }
   # prepend trailer bytes
diff --git a/linux/403unicode.mu b/linux/403unicode.mu
index 2baefd9f..8594615a 100644
--- a/linux/403unicode.mu
+++ b/linux/403unicode.mu
@@ -199,7 +199,7 @@ fn read-grapheme in: (addr stream byte) -> _/eax: grapheme {
     }
 $read-grapheme:abort: {
       # TODO: print to stderr
-      print-string-to-real-screen "utf-8 encodings larger than 4 bytes are not supported. First byte seen: "
+      print-string-to-real-screen "utf-8 encodings larger than 4 bytes are not yet supported. First byte seen: "
       var n/eax: int <- copy c
       print-int32-hex-to-real-screen n
       print-string-to-real-screen "\n"