[plt-scheme] mzscheme and R6RS error

From: Grant Rettke (grettke at acm.org)
Date: Sun Dec 21 19:21:51 EST 2008

On Sun, Dec 21, 2008 at 8:11 AM, Andreas Rottmann <a.rottmann at gmx.at> wrote:
> Hi!
>
> I'm playing with mzscheme's R6RS support, and found two issues with this
> simple test program:
>
> ---------mz-test.scm-----------
> #!r6rs
>
> (import (rnrs))
>
> (define (foo x y)
>  (when (> x y)
>    (error 'foo "x must be <= y" x y))
>  (- y x))
>
> (display (foo 1 2)) (newline)
> (display (foo 3 2)) (newline)
> --------mz-test.scm------------
>
> Running "mzscheme mz-test.scm", I get the following:
>
>       1
>       foo: x must be <= y
>
>        === context ===
>       /usr/local/stow/plt/lib/plt/collects/rnrs/base-6.ss:407:0: r6rs:error
>
> Note that the message is less useful than it could be, because the
> irritants (i.e. the values of x and y) are not included.
>
> However, trying to get an error trace using "mzscheme -l errortrace
> mz-test.scm", I get no output at all.

Here is how Ypsilon handled it:

1

error in foo: x must be <= y

irritants:
  3
  2

backtrace:
  0  (error 'foo "x must be <= y" x y)
  ..."C:/temp/test.scm" line 5
  1  (foo 3 2)
  ..."C:/temp/test.scm" line 9


Posted on the users mailing list.