branch: externals/ebdb
commit cbb4cc13902fd1c6bceb070e1dfd6a7aeba39b42
Author: Eric Abrahamsen <[email protected]>
Commit: Eric Abrahamsen <[email protected]>
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.