[plt-scheme] EOPL language question - error handling

From: Mark Engelberg (mark.engelberg at gmail.com)
Date: Fri Mar 28 14:41:07 EDT 2008

So, once you have a read-eval-print loop, one thing you might want to
do is upon an error, print the error message, and then restart the
read-eval-print loop.  I'm not sure how to do that.

Tried stuff like this:

(define read-eval-print
  (sllgen:make-rep-loop "> " (lambda (pgm)(print (eval pgm)))
                        (sllgen:make-stream-parser scanner grammar)))
(define eopl:error-stop read-eval-print)

This eats the first error message and continues, but the second error
message crashes you out of the repl and prints a double error message.

How to make this work?

Thanks,

Mark


Posted on the users mailing list.