[racket] how to get sandbox to drop errors
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)))
On Fri, Apr 12, 2013 at 4:17 PM, Michael Wilber <mwilber at uccs.edu> wrote:
> 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 <stchang at 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