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

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

[elpa] externals/ebdb d35e158 3/4: Catch ebdb-record-unfound error when


From: Eric Abrahamsen
Subject: [elpa] externals/ebdb d35e158 3/4: Catch ebdb-record-unfound error when formatting relation fields
Date: Thu, 3 Sep 2020 21:49:54 -0400 (EDT)

branch: externals/ebdb
commit d35e1581c911080b4882ff54dde8b67a84745adc
Author: Eric Abrahamsen <eric@ericabrahamsen.net>
Commit: Eric Abrahamsen <eric@ericabrahamsen.net>

    Catch ebdb-record-unfound error when formatting relation fields
    
    * ebdb-com.el (ebdb-fmt-field): That was the whole point of having
    this error.
---
 ebdb-com.el | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/ebdb-com.el b/ebdb-com.el
index 02f9e16..2f6ccd0 100644
--- a/ebdb-com.el
+++ b/ebdb-com.el
@@ -618,8 +618,10 @@ Print the first line, add an ellipsis, and add a tooltip."
 If FIELD really belongs to RECORD, display the \"other end\" of
 the relation.  If this RECORD is the \"other end\", display the
 record that actually owns the field."
-  (let ((rec (ebdb-record-related record field)))
-    (ebdb-string rec)))
+  (condition-case nil
+      (let ((rec (ebdb-record-related record field)))
+       (ebdb-string rec))
+    (ebdb-related-unfound "record not loaded")))
 
 (cl-defmethod ebdb-fmt-field ((_fmt ebdb-formatter-ebdb)
                              (field ebdb-field-passport)



reply via email to

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