emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/buttercup ce75b50 115/340: Report load errors in buttercup


From: ELPA Syncer
Subject: [nongnu] elpa/buttercup ce75b50 115/340: Report load errors in buttercup-run-discover
Date: Thu, 16 Dec 2021 14:59:16 -0500 (EST)

branch: elpa/buttercup
commit ce75b50fc2ec9edf8a66821b31b911bd849f681c
Author: Erik Anderson <erikbpanderson@gmail.com>
Commit: Erik Anderson <erikbpanderson@gmail.com>

    Report load errors in buttercup-run-discover
    
    Previously file load errors were uncaught resulting in the core error
    message being printed, but without any context.  In a project with
    many test files a syntax error may be nearly untenable.
    
    This change reports the error message with the name of the file as
    context and then resumes loading test files and running the test suite.
---
 buttercup.el | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/buttercup.el b/buttercup.el
index 09a39c7..0def52d 100644
--- a/buttercup.el
+++ b/buttercup.el
@@ -684,7 +684,10 @@ current directory."
       (dolist (file (directory-files-recursively
                      dir "\\`test-.*\\.el\\'\\|-tests?\\.el\\'"))
         (when (not (string-match "\\(^\\|/\\)\\." (file-relative-name file)))
-          (load file nil t))))
+          (condition-case err
+              (load file nil t)
+            (error
+             (message (format "Error while loading %s:\n%s" file 
(error-message-string err))))))))
     (when patterns
       (let ((suites-or-specs buttercup-suites))
         (while suites-or-specs



reply via email to

[Prev in Thread] Current Thread [Next in Thread]