mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-20 03:30:27 +02:00
(fill-message): check first whether args is null.
This commit is contained in:
parent
7cb1d4d305
commit
9561554c13
2 changed files with 20 additions and 16 deletions
|
@ -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>
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue