[R6RS] "error" and "violation"

Michael Sperber sperber at informatik.uni-tuebingen.de
Tue May 16 12:32:54 EDT 2006

dyb at cs.indiana.edu writes:

> I'd prefer that violation and error take a "who" argument, as in:
> [...]
> where &who is another condition type.  who should be a string or symbol
> identifying the entity reporting the error (e.g., a procedure name) or
> #f if the caller doesn't want to identify the entity.

Fine with me.

> Incidentally, I still don't fully appreciate the distinction between
> &error and &violation and, more importantly, when to use one and not the
> other, and the draft exc.tex is vague on this point.

An &error condition says that something has gone bad in the world, and
a &violation means that there's a bug in the program.  The litmus test
is if a call to a primitive that may raise an exception could tell
beforehand if it's going to raise an exception.  If no, it's an
&error, if yes, it's a &violation.  The distinction isn't always
clearcut---in that case, you might have a condition specifying both.

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

More information about the R6RS mailing list