* [PATCH] emacs: Honor debug-on-error for part renderers
@ 2014-04-18 22:57 Austin Clements
2014-04-19 4:11 ` David Bremner
0 siblings, 1 reply; 2+ messages in thread
From: Austin Clements @ 2014-04-18 22:57 UTC (permalink / raw)
To: notmuch
Previously, even if debug-on-error was non-nil, the debugger would not
trap on part renderer errors. This made debugging part renderer bugs
frustrating, so let the debugger trap these errors.
---
emacs/notmuch-show.el | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index f6ca827..df10d4b 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -785,7 +785,10 @@ (defun notmuch-show-insert-bodypart-internal (msg part content-type nth depth bu
(while (and handlers
(not (condition-case err
(funcall (car handlers) msg part content-type nth depth button)
- (error (progn
+ ;; Specifying `debug' here lets the debugger
+ ;; run if `debug-on-error' is non-nil.
+ ((debug error)
+ (progn
(insert "!!! Bodypart insert error: ")
(insert (error-message-string err))
(insert " !!!\n") nil)))))
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] emacs: Honor debug-on-error for part renderers
2014-04-18 22:57 [PATCH] emacs: Honor debug-on-error for part renderers Austin Clements
@ 2014-04-19 4:11 ` David Bremner
0 siblings, 0 replies; 2+ messages in thread
From: David Bremner @ 2014-04-19 4:11 UTC (permalink / raw)
To: Austin Clements, notmuch
Austin Clements <amdragon@MIT.EDU> writes:
> Previously, even if debug-on-error was non-nil, the debugger would not
> trap on part renderer errors. This made debugging part renderer bugs
> frustrating, so let the debugger trap these errors.
pushed
d
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-04-19 4:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-18 22:57 [PATCH] emacs: Honor debug-on-error for part renderers Austin Clements
2014-04-19 4:11 ` David Bremner
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).