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

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

[elpa] externals/ebdb cbb4cc1 20/21: More complete error handling for fi


From: Eric Abrahamsen
Subject: [elpa] externals/ebdb cbb4cc1 20/21: More complete error handling for field insertion
Date: Sun, 17 Sep 2017 15:32:49 -0400 (EDT)

branch: externals/ebdb
commit cbb4cc13902fd1c6bceb070e1dfd6a7aeba39b42
Author: Eric Abrahamsen <address@hidden>
Commit: Eric Abrahamsen <address@hidden>

    More complete error handling for field insertion
    
    * ebdb-com.el (ebdb-insert-field): We were only catching the
      'ebdb-unacceptable-field error; other errors were being silently
      swallowed.
---
 ebdb-com.el | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/ebdb-com.el b/ebdb-com.el
index 002d3ea..c33de0e 100644
--- a/ebdb-com.el
+++ b/ebdb-com.el
@@ -1549,10 +1549,13 @@ in `ebdb-db-list', using its default record class.  Use
         clone)
       (ebdb-with-record-edits (r records)
        (setq clone (clone field))
-       (condition-case nil
-         (ebdb-record-insert-field r clone)
+       (condition-case err
+           (ebdb-record-insert-field r clone)
          (ebdb-unacceptable-field
-          (message "Record %s cannot accept field %s" (ebdb-string r) field)
+          (message "Record %s cannot accept field %s" (ebdb-string r) 
(ebdb-string field))
+          (sit-for 2))
+         (error
+          (message "Error inserting field: %s, %s" (car err) (cdr err))
           (sit-for 2)))))))
 
 ;; TODO: Allow editing of multiple record fields simultaneously.



reply via email to

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