[plt-scheme] scribble examples and errors

From: Ryan Culpepper (ryanc at ccs.neu.edu)
Date: Wed Aug 26 14:03:51 EDT 2009

How can I eliminate the "eval:X:0:" prefix from the error message  
shown in scribble examples for syntax errors, while still showing the  
terms that caused the error?

For example, if I put this in my scribble file:

   @(examples (raise-syntax-error 'some-example "some message" #'x))

I get this in the output:

   Example:
     > (raise-syntax-error 'some-example "some message" #'x)
     eval:1:0: some-example: some message in: x

If I create an evaluator and set the 'error-print-source-location'  
parameter to #f within the evaluator, the prefix goes away but so do  
the terms:

   Example:
     > (raise-syntax-error 'some-example "some message" #'x)
     some-example: some message

Is there any way to get the following?

   Example:
     > (raise-syntax-error 'some-example "some message" #'x)
     some-example: some message in: x

Ryan

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20090826/d9db3c97/attachment.html>

Posted on the users mailing list.