diff options
author | Gary Houston <ghouston@arglist.com> | 1996-09-07 21:34:09 +0000 |
---|---|---|
committer | Gary Houston <ghouston@arglist.com> | 1996-09-07 21:34:09 +0000 |
commit | 9561554c136a568642c596e1300a5eee3d1aa175 (patch) | |
tree | 9c46998ad28e1fa9bb4ebabe92270ba7da2cc2d3 | |
parent | 7cb1d4d3059649fd611551e06c3c7aaae6d97397 (diff) | |
download | guile-9561554c136a568642c596e1300a5eee3d1aa175.tar.gz |
(fill-message): check first whether args is null.
-rw-r--r-- | ice-9/ChangeLog | 1 | ||||
-rw-r--r-- | ice-9/boot-9.scm | 35 |
2 files changed, 20 insertions, 16 deletions
diff --git a/ice-9/ChangeLog b/ice-9/ChangeLog index e742b1a47..fac058494 100644 --- a/ice-9/ChangeLog +++ b/ice-9/ChangeLog @@ -2,6 +2,7 @@ Sat Sep 7 06:44:47 1996 Gary Houston <ghouston@actrix.gen.nz> * boot-9.scm (%%handle-system-error): recognise errors thrown by lgh-error (fill-message etc.) + (fill-message): check first whether args is null. Thu Sep 5 11:33:41 1996 Jim Blandy <jimb@floss.cyclic.com> diff --git a/ice-9/boot-9.scm b/ice-9/boot-9.scm index ed8166deb..e70bb7e00 100644 --- a/ice-9/boot-9.scm +++ b/ice-9/boot-9.scm @@ -677,22 +677,25 @@ (args (caddr arg-list)) (rest (cadddr arg-list)) (cep (current-error-port)) - (fill-message (lambda (message args) - (let ((len (string-length message))) - (cond ((< len 2) - (display message cep)) - ((string=? (substring message 0 2) - "%S") - (display (car args) cep) - (fill-message - (substring message 2 len) - (cdr args))) - (else - (display (substring message 0 2) - cep) - (fill-message - (substring message 2 len) - args))))))) + (fill-message + (lambda (message args) + (if (null? args) + (display message cep) + (let ((len (string-length message))) + (cond ((< len 2) + (display message cep)) + ((string=? (substring message 0 2) + "%S") + (display (car args) cep) + (fill-message + (substring message 2 len) + (cdr args))) + (else + (display (substring message 0 2) + cep) + (fill-message + (substring message 2 len) + args)))))))) (display "ERROR: " cep) (display subr cep) (display ": " cep) |