From: Robert Pluim Date: Fri, 14 Jan 2022 08:03:53 +0000 (+0100) Subject: Improve some nntp/nnimap error messages X-Git-Tag: emacs-29.0.90~3069 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=39114e1e2b2cf7042cb5e4e6b3a0367ebfd53555;p=emacs.git Improve some nntp/nnimap error messages * lisp/gnus/nntp.el (nntp-send-string): (nntp-wait-for): (nntp-accept-process-output): (nntp-possibly-change-group): * lisp/gnus/nnimap.el (nnimap-retrieve-headers): Improve error messages (bug#53070). --- diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el index 090cb9b245b..cff628061e9 100644 --- a/lisp/gnus/nnimap.el +++ b/lisp/gnus/nnimap.el @@ -246,7 +246,7 @@ during splitting, which may be slow." (nnimap-header-parameters)) t) (unless (process-live-p (get-buffer-process (current-buffer))) - (error "Server closed connection")) + (error "IMAP server %S closed connection" nnimap-address)) (nnimap-transform-headers) (nnheader-remove-cr-followed-by-lf)) (insert-buffer-substring diff --git a/lisp/gnus/nntp.el b/lisp/gnus/nntp.el index 624c64d4d75..0dcff9743ad 100644 --- a/lisp/gnus/nntp.el +++ b/lisp/gnus/nntp.el @@ -306,7 +306,7 @@ backend doesn't catch this error.") (nntp-record-command string)) (process-send-string process (concat string nntp-end-of-line)) (or (memq (process-status process) '(open run)) - (nntp-report "Server closed connection"))) + (nntp-report "NNTP server %S closed connection" nntp-address))) (defun nntp-record-command (string) "Record the command STRING." @@ -369,7 +369,7 @@ retried once before actually displaying the error report." (nntp-snarf-error-message) nil)) ((not (memq (process-status process) '(open run))) - (nntp-report "Server closed connection")) + (nntp-report "NNTP server %S closed connection" nntp-address)) (t (goto-char (point-max)) (let ((limit (point-min)) @@ -1431,7 +1431,7 @@ If SEND-IF-FORCE, only send authinfo to the server if the ;; be the process's former output buffer (i.e. now killed) (or (and process (memq (process-status process) '(open run))) - (nntp-report "Server closed connection"))))) + (nntp-report "NNTP server %S closed connection" nntp-address))))) (defun nntp-accept-response () "Wait for output from the process that outputs to BUFFER." @@ -1450,7 +1450,7 @@ If SEND-IF-FORCE, only send authinfo to the server if the (when group (let ((entry (nntp-find-connection-entry nntp-server-buffer))) (cond ((not entry) - (nntp-report "Server closed connection")) + (nntp-report "NNTP server %S closed connection" nntp-address)) ((not (equal group (caddr entry))) (with-current-buffer (process-buffer (car entry)) (erase-buffer)