[plt-scheme] mzscheme and R6RS error
At Sun, 21 Dec 2008 15:11:00 +0100, Andreas Rottmann wrote:
> 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.
In SVN, I've added the irritants to the exception messages constructed
by `error' and `assertion-violation'.
> However, trying to get an error trace using "mzscheme -l errortrace
> mz-test.scm", I get no output at all.
You wanted
mzscheme -l errrortrace -t mz-test.scm
When you run `mzscheme mz-test.scm', then `-t' is inserted
automatically, since there is no command-line flag before the first
argument. But when you provide `-l errortrace', then you have to be
more explicit about how to treat the "mz-test.scm" argument.
Matthew