Skip to content

Commit

Permalink
Use logger for expansion failures
Browse files Browse the repository at this point in the history
Also, improve the error message formatting.
  • Loading branch information
jackfirth committed Aug 31, 2024
1 parent 3bfbdef commit 57e50b5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion main.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,10 @@
(define source (file-source path))

(define (skip e)
(printf "resyntax: skipping ~a due to syntax error: ~e\n" path (exn-message e))
(log-resyntax-error
"skipping ~a\n encountered a syntax error during macro expansion\n error:\n~a"
path
(string-indent (exn-message e) #:amount 3))
empty-list)

(with-handlers ([exn:fail:syntax? skip]
Expand Down

0 comments on commit 57e50b5

Please sign in to comment.