Raise a clearer exception when a linter crashes

This commit is contained in:
Christopher Baines 2022-05-23 19:19:57 +01:00
parent 64be52844e
commit e5cb793d4e

View file

@ -494,11 +494,19 @@ WHERE job_id = $1")
(let* ((package (hashv-ref %package-table package-id)) (let* ((package (hashv-ref %package-table package-id))
(warnings (warnings
(map process-lint-warning (map process-lint-warning
(with-exception-handler
(lambda (exn)
(simple-format (current-error-port)
"exception checking ~A with ~A checker: ~A\n"
package ',checker-name exn)
(raise-exception exn))
(lambda ()
(if (and lint-checker-requires-store?-defined? (if (and lint-checker-requires-store?-defined?
(lint-checker-requires-store? checker)) (lint-checker-requires-store? checker))
(check package #:store store) (check package #:store store)
(check package))))) (check package)))
#:unwind? #t))))
(if (null? warnings) (if (null? warnings)
#f #f
(cons package-id warnings)))) (cons package-id warnings))))