Skip to content

Commit 2ac3eb3

Browse files
committed
Handle lists in error->string in Gambit.
1 parent 1f2a171 commit 2ac3eb3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

assert.scm

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@
66
(include "assert-r5rs.scm")
77

88
(define (-error->string ex)
9-
(cond ((symbol? ex) (symbol->string ex))
9+
(cond ((null? ex) "")
1010
((string? ex) ex)
11+
((symbol? ex) (symbol->string ex))
12+
((list? ex) (string-append " (" (apply string-append (map -error->string ex)) ")"))
1113
;; Gambit specific code
1214
((error-exception? ex) (-error->string (error-exception-message ex)))
1315
((unbound-global-exception? ex) (-error->string (unbound-global-exception-variable ex))) ; variable name

0 commit comments

Comments
 (0)