From 89d17dac008a5a9bb8ed4550015c65b2dd18779b Mon Sep 17 00:00:00 2001 From: keiichi Date: Tue, 9 Mar 1999 01:38:31 +0000 Subject: [PATCH] (mime-display-entity): Catch error when `debug-on-error' is `nil'. --- mime-view.el | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/mime-view.el b/mime-view.el index 14bca3c..5f5c344 100644 --- a/mime-view.el +++ b/mime-view.el @@ -773,7 +773,18 @@ MEDIA-TYPE must be (TYPE . SUBTYPE), TYPE or t. t means default." ) (cond (children) ((functionp body-presentation-method) - (funcall body-presentation-method entity situation) + (if debug-on-error + (funcall body-presentation-method entity situation) + (condition-case err + (funcall body-presentation-method entity situation) + (error (let ((start (point))) + (insert (format "Presentation error occured: %s + +If you'd like to debug this error. +Please set non-nil to `debug-on-error'.\n\n" err)) + (put-text-property start (point) + 'face 'font-lock-warning-face) + )))) ) (t (when button-is-invisible -- 1.7.10.4