aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Tomi Ollila <tomi.ollila@iki.fi>2012-10-21 16:35:09 +0300
committerGravatar David Bremner <bremner@debian.org>2012-11-07 08:04:12 -0400
commit7c6ac9fbae354cf0f5dd1686476a99f2420bc689 (patch)
tree9274e5d6effcb0e63ce62664f4b3fddac4d12f32
parent96864a9aea20f477d5542e5fb390becf20942337 (diff)
emacs/notmuch-show.el: handle bodypart insert error
When inserting of email bodypart failes, insert a failure message to the buffer (and continue) instead of halting the insertion of the rest of that email thread in question.
-rw-r--r--emacs/notmuch-show.el7
1 files changed, 6 insertions, 1 deletions
diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index f273eb40..d061367e 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -815,7 +815,12 @@ message at DEPTH in the current thread."
;; Run the content handlers until one of them returns a non-nil
;; value.
(while (and handlers
- (not (funcall (car handlers) msg part content-type nth depth declared-type)))
+ (not (condition-case err
+ (funcall (car handlers) msg part content-type nth depth declared-type)
+ (error (progn
+ (insert "!!! Bodypart insert error: ")
+ (insert (error-message-string err))
+ (insert " !!!\n") nil)))))
(setq handlers (cdr handlers))))
t)