* nntp.el (nntp-retrieve-data): Report the error and return nil.
authorShengHuo ZHU <zsh@cs.rochester.edu>
Sat, 22 Apr 2000 00:59:00 +0000 (00:59 +0000)
committerShengHuo ZHU <zsh@cs.rochester.edu>
Sat, 22 Apr 2000 00:59:00 +0000 (00:59 +0000)
lisp/ChangeLog
lisp/nntp.el

index 7e14e9b..4e80f71 100644 (file)
@@ -1,3 +1,7 @@
+2000-04-21 20:52:09  Shenghuo ZHU  <zsh@cs.rochester.edu>
+
+       * nntp.el (nntp-retrieve-data): Report the error and return nil.
+
 2000-04-21 19:38:43  Shenghuo ZHU  <zsh@cs.rochester.edu>
 
        * mm-bodies.el (mm-decode-content-transfer-encoding): Don't remove
index 6d47a20..045b238 100644 (file)
@@ -335,17 +335,23 @@ noticing asynchronous data.")
        (save-excursion
          (set-buffer (process-buffer process))
          (erase-buffer)))
-      (when command
-       (nntp-send-string process command))
-      (cond
-       ((eq callback 'ignore)
-       t)
-       ((and callback wait-for)
-       (nntp-async-wait process wait-for buffer decode callback)
-       t)
-       (wait-for
-       (nntp-wait-for process wait-for buffer decode))
-       (t t)))))
+      (condition-case err
+         (progn
+           (when command
+             (nntp-send-string process command))
+           (cond
+            ((eq callback 'ignore)
+             t)
+            ((and callback wait-for)
+             (nntp-async-wait process wait-for buffer decode callback)
+             t)
+            (wait-for
+             (nntp-wait-for process wait-for buffer decode))
+            (t t)))
+       (error 
+        (nnheader-report 'nntp "Couldn't open connection to %s: %s" 
+                         address err))
+       (quit nil)))))
 
 (defsubst nntp-send-command (wait-for &rest strings)
   "Send STRINGS to server and wait until WAIT-FOR returns."