[R6RS] Protocol for handling encoding/decoding errors

William D Clinger will at ccs.neu.edu
Thu Aug 24 12:15:41 EDT 2006

Mike wrote:
> Here's a first cut at it, mainly for Will:
> For encoding errors...

I think your first cut is good enough for the 1 Sept

> This has the disadvantage that a handler may want to try handling the
> error, decline and leave the handling to some higher-level handler,
> but that "try handling" involves removing data from the port, which is
> not reversible.  I don't know an easy way around this.

It may not be "easy", but your first cut plus the rest
of R6RS does provide a way: combine the condition with
another that contains the bytes that were read during
the first attempt to handle the error.  A higher-level
handler that understands the combined condition would
then be able to recover.

Our responsibility is to provide the mechanisms, not
(all of) the solutions.


More information about the R6RS mailing list