From: Eric Abrahamsen Date: Sat, 4 Dec 2021 21:41:23 +0000 (-0800) Subject: Don't swallow gnus-search errors when creating nnselect groups X-Git-Tag: emacs-29.0.90~3617^2~19 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=2898566fa0db33804cde57a34475e4c32f2f9bf2;p=emacs.git Don't swallow gnus-search errors when creating nnselect groups * lisp/gnus/gnus-search.el (gnus-search-run-query): Modify condition-case to re-signal any gnus-search related errors; the user should see them. (gnus-search-error): Define a new parent error for all gnus-search errors. --- diff --git a/lisp/gnus/gnus-search.el b/lisp/gnus/gnus-search.el index bce5d57c521..c77de688e66 100644 --- a/lisp/gnus/gnus-search.el +++ b/lisp/gnus/gnus-search.el @@ -105,9 +105,13 @@ (gnus-add-shutdown #'gnus-search-shutdown 'gnus) -(define-error 'gnus-search-parse-error "Gnus search parsing error") +(define-error 'gnus-search-error "Gnus search error") -(define-error 'gnus-search-config-error "Gnus search configuration error") +(define-error 'gnus-search-parse-error "Gnus search parsing error" + 'gnus-search-error) + +(define-error 'gnus-search-config-error "Gnus search configuration error" + 'gnus-search-error) ;;; User Customizable Variables: @@ -1927,7 +1931,7 @@ Assume \"size\" key is equal to \"larger\"." (apply #'nnheader-message 4 "Search engine for %s improperly configured: %s" server (cdr err)) - (signal 'gnus-search-config-error err))))) + (signal (car err) (cdr err)))))) (alist-get 'search-group-spec specs)) ;; Some search engines do their own limiting, but some don't, so ;; do it again here. This is bad because, if the user is diff --git a/lisp/gnus/nnselect.el b/lisp/gnus/nnselect.el index ecec705b326..252e9f66838 100644 --- a/lisp/gnus/nnselect.el +++ b/lisp/gnus/nnselect.el @@ -779,6 +779,10 @@ Return an article list." (args (alist-get 'nnselect-args specs))) (condition-case-unless-debug err (funcall func args) + ;; Don't swallow gnus-search errors; the user should be made + ;; aware of them. + (gnus-search-error + (signal (car err) (cdr err))) (error (gnus-error 3 "nnselect-run: %s on %s gave error %s" func args err) []))))