Better check for 'is this error from a macro'

This commit is contained in:
Sam Tobin-Hochstadt 2008-07-07 15:54:19 -04:00
parent 2de55888f1
commit 4758c0b14d

View File

@ -85,7 +85,7 @@
(let ([stx (locate-stx (current-orig-stx))])
;; If this isn't original syntax, then we can get some pretty bogus error messages. Note
;; that this is from a macro expansion, so that introduced vars and such don't confuse the user.
(if (syntax-original? stx)
(if (eq? (syntax-source (current-orig-stx)) (syntax-source (orig-module-stx)))
(raise-typecheck-error (apply format msg rest) (list stx))
(raise-typecheck-error (apply format (string-append "Error in macro expansion -- " msg) rest) (list stx)))))