guard use of exn-message

closes PR 13316
This commit is contained in:
Robby Findler 2012-11-28 13:16:58 -06:00
parent 253ae42558
commit 97454b6e55

View File

@ -204,7 +204,8 @@
(andmap (λ (srcloc) (equal? (srcloc-source srcloc) the-source))
(exn:fail:read-srclocs exn)))
'reader-in-defs-error]
[(regexp-match #rx"expand: unbound identifier" (exn-message exn))
[(and (exn? exn)
(regexp-match #rx"expand: unbound identifier" (exn-message exn)))
'exn:variable]
[else 'exn])
(trim-message