branch: externals/ebdb
commit d35e1581c911080b4882ff54dde8b67a84745adc
Author: Eric Abrahamsen <e...@ericabrahamsen.net>
Commit: Eric Abrahamsen <e...@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