[racket] how to get sandbox to drop errors

From: Eli Barzilay (eli at barzilay.org)
Date: Sat Apr 13 10:39:39 EDT 2013

Yesterday, Stephen Chang wrote:
> Ah of course. The following still gives me the error though? Is this
> supposed to happen?
> 
> #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)))

Probably not -- but that's a relatively new parameter, which might
need more work.  Before this parameter, the principle of a sandbox was
that the evaluation happens inside the protected box, and you get its
results whether they're values or exceptions.

(BTW, I'm not sure if that parameter is a good idea -- I think that a
better one would be some way to make the sandbox more completely
segregated, with both values and exceptions done via only its IO.)

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!

Posted on the users mailing list.