From 39114e1e2b2cf7042cb5e4e6b3a0367ebfd53555 Mon Sep 17 00:00:00 2001 From: Robert Pluim Date: Fri, 14 Jan 2022 09:03:53 +0100 Subject: [PATCH] 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). --- lisp/gnus/nnimap.el | 2 +- lisp/gnus/nntp.el | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) 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) -- 2.39.2