[R6RS] "error" and "violation"

Michael Sperber sperber at informatik.uni-tuebingen.de
Fri May 12 13:30:02 EDT 2006

I posted this a while ago in a thread on the core/library split:

> - I'd like r6rs-small to have explicit records, no I/O, and no
>   syntax-case.  Possibly, there should be "error" and "violation"
>   convenience procedures to raise exceptions.  (Syntax-case is already
>   pretty heavy; I/O is not needed in many programs; records are.)

This got lost in the shuffle, so I'd like to propose it more
formally.  Specifically, I suggest that these procedure be added, and
that they behave as if they were defined as follows:

(define (violation msg . irritants)
    (&irritants (values irritants))
    (&message (message msg)))))

(define (error msg . irritants)
    (&irritants (values irritants))
    (&message (message msg)))))

where &irritants is a condition type with the following definition:

(define-condition-type &irritants &condition
  (values condition-irritants))

Cheers =8-} Mike
Friede, Völkerverständigung und überhaupt blabla

More information about the R6RS mailing list