Make nntp report connection errors better
authorLars Ingebrigtsen <larsi@gnus.org>
Wed, 1 Feb 2012 22:14:05 +0000 (23:14 +0100)
committerLars Ingebrigtsen <larsi@gnus.org>
Wed, 1 Feb 2012 22:14:05 +0000 (23:14 +0100)
* nntp.el (nntp-open-connection): Report the error message if the nntp
server can't be reached.

lisp/ChangeLog
lisp/nntp.el

index f541ee1..a323a37 100644 (file)
@@ -1,5 +1,8 @@
 2012-02-01  Lars Ingebrigtsen  <larsi@gnus.org>
 
+       * nntp.el (nntp-open-connection): Report the error message if the nntp
+       server can't be reached.
+
        * nnimap.el (nnimap-retrieve-group-data-early): Keep track of how many
        groups we do a total scan for.
        (nnimap-wait-for-response): Say that we're doing a total scan, if we're
index 7148fdb..98393a6 100644 (file)
@@ -1385,6 +1385,10 @@ password contained in '~/.nntp-authinfo'."
       (nnheader-cancel-timer timer))
     (when (and process
               (not (memq (process-status process) '(open run))))
+      (with-current-buffer pbuffer
+       (goto-char (point-min))
+       (nnheader-report 'nntp "Error when connecting: %s"
+                        (buffer-substring (point) (line-end-position))))
       (setq process nil))
     (unless process
       (nntp-kill-buffer pbuffer))