[racket] Scribble: Getting BSL error messages

From: Klaus Ostermann (klaus612 at gmail.com)
Date: Mon Apr 14 13:04:09 EDT 2014

I'm using Scribble to write lecture notes on the "Beginning Student
Language".

To this end, I'm using

@(require (for-label lang/htdp-beginner))

to get the bindings for the functions defined in BSL.

However, if I want to illustrate an error, I get the wrong error message.

For instance,

@ex[(number->string "asdf")]

gives the ouput:

> (number->string "asdf")

number->string: contract violation
  expected: number?
  given: "asdf"


rather than the expected:

> (number->string "asdf")

number->string: expects a number, given "asdf"

What do I need to do to get the BSL error messages?

Klaus

Posted on the users mailing list.