* fix error handling (with errors in the proc-filter context)

This commit is contained in:
djcb
2012-07-24 01:33:52 +03:00
parent d92ad056e1
commit fd65b992d5
2 changed files with 16 additions and 15 deletions

View File

@ -525,9 +525,10 @@ process."
(defun mu4e-error-handler (errcode errmsg)
"Handler function for showing an error."
;; don't use mu4e-error here; it's running in the process filter ctx
(case errcode
(4 (mu4e-error "No matches for this search query."))
(case errcode
(4 (error "No matches for this search query."))
(t (error "Error %d: %s" errcode errmsg))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@ -625,7 +626,6 @@ FUNC (if non-nil) afterwards."
;; explicit version checks are a bit questionable,
;; better to check for specific features
(unless (>= emacs-major-version 23)
(mu4e-error "Emacs >= 23.x is required for mu4e"))
(mu4e-error "Emacs >= 23.x is required for mu4e"))
;; set up the 'pong' handler func
(lexical-let ((func func))