1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 11:50:28 +02:00

scm-error-printer resilience

* module/ice-9/boot-9.scm (scm-error-printer): Allow #f for rest args,
  interpreting it as '().  Fixes regexp throws, which are of the form:

    (regular-expression-syntax "make-regexp" "Invalid preceding regular expression" #f ("?.*"))
This commit is contained in:
Andy Wingo 2011-02-27 23:15:13 +01:00
parent 450aee6790
commit 4e33a13246

View file

@ -538,7 +538,7 @@ If there is no handler at all, Guile prints an error and then exits."
((subr msg args . rest) ((subr msg args . rest)
(if subr (if subr
(format port "In procedure ~a: " subr)) (format port "In procedure ~a: " subr))
(apply format port msg args)) (apply format port msg (or args '())))
(_ (default-printer))) (_ (default-printer)))
args)) args))