Skip to content

Commit

Permalink
Accomodate new error message in Racket 7; fixes #219
Browse files Browse the repository at this point in the history
  • Loading branch information
Greg Hendershott committed May 25, 2018
1 parent 51730d0 commit 2bc070a
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions frog/config/main.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,16 @@
(match (exn:fail:syntax-exprs exn)
[(cons stx _) (syntax-e stx)]
[_ #f]))
(define (provided-identifier-message? e)
(define msg (exn-message e))
(define rxs '(#rx"provided identifier not defined or imported" ;v6
#rx"provided identifier is not defined or required")) ;v7
(for/or ([rx (in-list rxs)])
(regexp-match? rx msg)))
(with-handlers
([(λ (e)
(and (exn:fail:syntax? e)
(regexp-match? #rx"provided identifier not defined or imported"
(exn-message e))
(provided-identifier-message? e)
(memq (fail-sym e) provide-syms)))
(λ (e)
(raise-syntax-error
Expand Down

0 comments on commit 2bc070a

Please sign in to comment.