From: keiichi Date: Tue, 9 Mar 1999 01:38:31 +0000 (+0000) Subject: (mime-display-entity): Catch error when `debug-on-error' is `nil'. X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=89d17dac008a5a9bb8ed4550015c65b2dd18779b;p=elisp%2Fsemi.git (mime-display-entity): Catch error when `debug-on-error' is `nil'. --- 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