This is the mail archive of the guile@sourceware.cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: message primitive


Mikael Djurfeldt <mdj@mdj.nada.kth.se> writes:

> "Greg J. Badros" <gjb@cs.washington.edu> writes:
>
> > The error handling code has a printf-like formatting capability such
> > that %S and %s format subsequent arguments as write or display style
> > output, respectively.  This seems generally useful, but is not available
> > at the scheme level
>
> What about
>
> (scm-error 'frukost-error 'nisse
>            "Found %s in %s" (list 'socka 'filmjölken)
>             '())

In GOOPS, I've defined:

;;
;; goops-error
;;
(define (goops-error format-string . args)
  (save-stack)
  (scm-error 'goops-error #f format-string args '()))

which I then use like

  (goops-error "malformed superclass list: %S" (supers exp))

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]