You're evaluating the (/ 1 0) before you make your evaluator. You have
to quote it.

The following works for me:

(define my-eval
  (parameterize ([sandbox-output #f]
                 [sandbox-error-output #f]
                 [sandbox-propagate-exceptions #f]
                 [sandbox-propagate-breaks #f])
    (make-evaluator 'racket)))
(my-eval '(/ 1 0))

Stephen Chang <stch...@ccs.neu.edu> writes:
> How do I get a sandbox to drop errors? The following code still
> produces the divide by 0 exception. What am I doing wrong?
>
> #lang racket
>
> (require racket/sandbox)
>
> (parameterize ([sandbox-output #f]
>                [sandbox-error-output #f]
>                [sandbox-propagate-exceptions #f]
>                [sandbox-propagate-breaks #f])
>   (make-evaluator 'racket (/ 1 0)))
> ____________________
>   Racket Users list:
>   http://lists.racket-lang.org/users
____________________
  Racket Users list:
  http://lists.racket-lang.org/users

Reply via email to