shithub: sl

Download patch

ref: 91d7a2d167f2eae02479f2129bf1dae2e79a1612
parent: 8b457cd416da8e0351f79968d5134455077a5c99
author: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
date: Mon Apr 14 13:38:42 EDT 2025

print-exception: handle assert-failed

--- a/boot/sl.boot
+++ b/boot/sl.boot
@@ -385,13 +385,13 @@
                                                      #fn("n02071A62:" #(#fn(for-each) write))
                                                      #fn("n1A50420061:" #(#fn(raise)))) princ)
             print #fn("z02071062:" #(#fn(for-each) write) print) print-exception
-            #fn("n170051;3N04700<51;3C04217205151;35040<853700=@30086;3?0486<R;360486<87;360486=853O0732485<512585T257685512756@30q48728CQ0732988<2:2;88T51275547<88T51@61872=CH0732>88T2?5347<88<51@\x190872@C@0732A88<2B53@\x040872CCB0732D5147388f2@\xed0872EC?07F88<514I:@\xd90872GCB0732H5147388f2@\xc20872ICB0732J5147388f2@\xab0872KC>0732L88<52@\x980872MCR0732N88<513702O@402P5147<88<51@q0872QCB0732R5147388f2@Z0872SQ;J804872TQ3;07388f2@?0732U5147<865147V60:" #(list?
+            #fn("n170051;3N04700<51;3C04217205151;35040<853700=@30086;3?0486<R;360486<87;360486=853O0732485<512585T257685512756@30q48728CQ0732988<2:2;88T51275547<88T51@M1872=CH0732>88T2?5347<88<51@01872@C@0732A88<2B53@\x1b0872CCB0732D5147388f2@\x040872EC?07F88<514I:@\xf00872GCB0732H5147388f2@\xd90872ICB0732J5147388f2@\xc20872KC>0732L88<52@\xaf0872MCR0732N88<513702O@402P5147<88<51@\x880872QCB0732R5147388f2@q0872SCB0732T5147388f2@Z0872UQ;J804872VQ3;07388f2@?0732W5147<865147X60:" #(list?
   #fn(io?) caar princ #fn(io-filename) ":" caddr ": " type-error "type error: expected " ", got "
   #fn(type-of) print bounds-error "index " " out of bounds for " unbound-error "eval: variable " " has no value"
   error "error: " load-error print-exception parse-error "parsing error: " arg-error "arguments error: "
   key-error "key not found: " const-error #fn(keyword?)
-  "keywords are read-only: " "tried to modify a constant: " io-error "I/O error: " divide-error
-  memory-error "*** Unhandled exception: " newline) print-exception)
+  "keywords are read-only: " "tried to modify a constant: " io-error "I/O error: " assert-failed "assertion failed: "
+  divide-error memory-error "*** Unhandled exception: " newline) print-exception)
             print-stack-trace #fn("n1IIb5b620852185>1_51420862285>1_5147374252627505252Eb82829868788>37:05162:" #(#0#
   #fn("n32005182P2105121151C?022232487e361:25051E76278851512888A187>4|:" #(#fn(fn-name)
                                                                            #fn(fn-code)
--- a/src/system.sl
+++ b/src/system.sl
@@ -1501,6 +1501,10 @@
            (princ "I/O error: ")
            (apply princ a))
 
+          ((eq? k 'assert-failed)
+           (princ "assertion failed: ")
+           (apply princ a))
+
           ((or (eq? k 'divide-error)
                (eq? k 'memory-error))
            (apply princ a))