[racket] Exception not being caught?

From: Tobias Hammer (tobias.hammer at dlr.de)
Date: Tue Sep 4 13:53:20 EDT 2012

>> (sudoku)
>  Cannot open file /Users/gregwoodhouse/sudoku/puzzles/puzzle-4a.sdk
> #(struct:exn:fail:filesystem call-with-input-file: cannot open input file
>   path: /Users/gregwoodhouse/sudoku/puzzles/puzzle-4a.sdk
>   system error: Permission denied; errno=13 #<continuation-mark-set>)

and

>       (with-handlers
>           ((exn:fail:filesystem?
>             (lambda (exn)
>               (printf " Cannot open file ~a~n~a~n" fname exn)))

match perfectly

Posted on the users mailing list.