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

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

[nongnu] elpa/parseclj 1f8e449897 105/185: Simplify error messages


From: ELPA Syncer
Subject: [nongnu] elpa/parseclj 1f8e449897 105/185: Simplify error messages
Date: Tue, 28 Dec 2021 14:05:25 -0500 (EST)

branch: elpa/parseclj
commit 1f8e44989759677206781531f9e31f9bc248c23d
Author: Daniel Barreto <daniel.barreto.n@gmail.com>
Commit: Daniel Barreto <daniel.barreto.n@gmail.com>

    Simplify error messages
---
 parseclj.el           |  6 +++---
 test/parseclj-test.el | 18 +++++++++---------
 2 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/parseclj.el b/parseclj.el
index 65c08344da..7a565bd31f 100644
--- a/parseclj.el
+++ b/parseclj.el
@@ -83,7 +83,7 @@ available options."
           (when fail-fast
             ;; any unreduced tokens left: bail early
             (when-let ((token (seq-find #'parseclj-lex-token? collection)))
-              (parseclj--error "parseclj: Syntax Error at position %s, 
unmatched %S"
+              (parseclj--error "At position %s, unmatched %S"
                                (a-get token :pos)
                                (parseclj-lex-token-type token))))
 
@@ -95,7 +95,7 @@ available options."
       ;; Unwound the stack without finding a matching paren: either bail early
       ;; or return the original stack and continue parsing
       (if fail-fast
-          (parseclj--error "parseclj: Syntax Error at position %s, unmatched 
%S"
+          (parseclj--error "At position %s, unmatched %S"
                            (a-get closing-token :pos)
                            (parseclj-lex-token-type closing-token))
 
@@ -221,7 +221,7 @@ functions. Additionally the following options are recognized
     ;; reduce root
     (when fail-fast
       (when-let ((token (seq-find #'parseclj-lex-token? stack)))
-        (parseclj--error "parseclj: Syntax Error at position %s, unmatched %S"
+        (parseclj--error "At position %s, unmatched %S"
                          (a-get token :pos)
                          (parseclj-lex-token-type token))))
 
diff --git a/test/parseclj-test.el b/test/parseclj-test.el
index 1809464141..3d6fbb1641 100644
--- a/test/parseclj-test.el
+++ b/test/parseclj-test.el
@@ -69,56 +69,56 @@
            (condition-case errdata
                (parseclj-parse-clojure "foo]")
              (parseclj-parse-error (cadr errdata)))
-           "parseclj: Syntax Error at position 4, unmatched :rbracket"))
+           "At position 4, unmatched :rbracket"))
 
   (should (equal
            (condition-case errdata
                (parseclj-parse-clojure "[foo")
              (parseclj-parse-error (cadr errdata)))
-           "parseclj: Syntax Error at position 1, unmatched :lbracket"))
+           "At position 1, unmatched :lbracket"))
 
   (should (equal
            (condition-case errdata
                (parseclj-parse-clojure "(1 2 [ 4)")
              (parseclj-parse-error (cadr errdata)))
-           "parseclj: Syntax Error at position 6, unmatched :lbracket"))
+           "At position 6, unmatched :lbracket"))
 
   (should (equal
            (condition-case errdata
                (parseclj-parse-clojure "1 2 #_")
              (parseclj-parse-error (cadr errdata)))
-           "parseclj: Syntax Error at position 5, unmatched :discard"))
+           "At position 5, unmatched :discard"))
 
   (should (equal
            (condition-case errdata
                (parseclj-parse-clojure "(1 [2 {3 ( 4}])")
              (parseclj-parse-error (cadr errdata)))
-           "parseclj: Syntax Error at position 10, unmatched :lparen")))
+           "At position 10, unmatched :lparen")))
 
 (ert-deftest parseclj-parse-clojure-fail-fast-test ()
   (should (equal
            (condition-case errdata
                (parseclj-parse-clojure "foo]")
              (parseclj-parse-error (cadr errdata)))
-           "parseclj: Syntax Error at position 4, unmatched :rbracket"))
+           "At position 4, unmatched :rbracket"))
 
   (should (equal
            (condition-case errdata
                (parseclj-parse-clojure "[foo")
              (parseclj-parse-error (cadr errdata)))
-           "parseclj: Syntax Error at position 1, unmatched :lbracket"))
+           "At position 1, unmatched :lbracket"))
 
   (should (equal
            (condition-case errdata
                (parseclj-parse-clojure "(1 2 [ 4)")
              (parseclj-parse-error (cadr errdata)))
-           "parseclj: Syntax Error at position 6, unmatched :lbracket"))
+           "At position 6, unmatched :lbracket"))
 
   (should (equal
            (condition-case errdata
                (parseclj-parse-clojure "1 2 #_")
              (parseclj-parse-error (cadr errdata)))
-           "parseclj: Syntax Error at position 5, unmatched :discard"))
+           "At position 5, unmatched :discard"))
 
   (should (equal (parseclj-parse-clojure "(1 [2 {3 ( 4}])" :fail-fast nil)
                  '((:node-type . :root)



reply via email to

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