branch: elpa/cycle-at-point
commit 0af1fa35f49d320960870b9dbcb4d03440139fdf
Author: Campbell Barton <[email protected]>
Commit: Campbell Barton <[email protected]>

    Improve error message: add context for internal error
---
 cycle-at-point-find-integer.el | 2 +-
 cycle-at-point.el              | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/cycle-at-point-find-integer.el b/cycle-at-point-find-integer.el
index 37ab602fe15..e0d17993a30 100644
--- a/cycle-at-point-find-integer.el
+++ b/cycle-at-point-find-integer.el
@@ -121,7 +121,7 @@ Optional keyword ARGS:
           (setq base 16)
           (setq c-search "[0-9_a-fA-F]+"))
          (t
-          (error "Internal error")))
+          (error "Internal error: unhandled prefix character %S" c)))
 
         (when (looking-at c-search)
           (let ((text (buffer-substring-no-properties pt-start (match-end 0))))
diff --git a/cycle-at-point.el b/cycle-at-point.el
index 29e96bd7e5d..080df34123d 100644
--- a/cycle-at-point.el
+++ b/cycle-at-point.el
@@ -254,7 +254,7 @@ Argument CYCLE-DATA is the list of cycle definitions to 
search."
                         (setq arg-words (cons word-orig (cdr arg-words)))
 
                         (unless (string-equal (downcase (car arg-words)) 
(downcase word-orig))
-                          (error "Internal error"))))
+                          (error "Internal error: rotated word list does not 
start with matched word"))))
 
                     (setq result (cons arg-words (cons beg end)))))))))))
       (incf cycle-data-index))

Reply via email to