catch more exceptions in the module lexer when it calls read-language

This commit is contained in:
Robby Findler 2011-02-10 09:55:49 -06:00
parent 0f14c6aa67
commit 50e9aec0ab

View File

@ -40,7 +40,7 @@ to delegate to the scheme-lexer (in the 'no-lang-line mode).
;; look for #lang:
(define p (peeking-input-port in))
(port-count-lines! p)
(define get-info (with-handlers ([exn:fail:read? values]) (read-language p (λ () 'fail))))
(define get-info (with-handlers ([exn:fail? values]) (read-language p (λ () 'fail))))
(cond
[(procedure? get-info)
(define end-pos (file-position p))