IMO, plot should raise that exception. Robby
On Wed, May 21, 2014 at 10:37 AM, Laurent <laurent.ors...@gmail.com> wrote: > ... it eats everything! (particularly exceptions) > For example, it is perfectly happy with the following: > > % racket > Welcome to Racket v6.0.1.7. >> (require plot) >> (plot (function (lambda(x)(+ x n))) > #:x-min 0 #:x-max 10 #:y-min 0 #:y-max 10) > (object:2d-plot-snip% ...) > > ... although n is clearly undefined. Presumably this is to avoid breaking on > math errors like `(/ 0)` ? > > Would it make sense to have an `exn:fail:arithmetic` exception struct so > that `function` would only catch those? > > Laurent > > > ____________________ > Racket Users list: > http://lists.racket-lang.org/users > ____________________ Racket Users list: http://lists.racket-lang.org/users