If one mail source bugs out, continue on and do the clean-up phase
[gnus] / lisp / nnmail.el
index dc2080d..f0ab19d 100644 (file)
@@ -1842,18 +1842,23 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details."
       ;; and fetch the mail from each.
       (while (setq source (pop fetching-sources))
        (when (setq new
-                   (mail-source-fetch
-                    source
-                    (gnus-byte-compile
-                     `(lambda (file orig-file)
-                        (nnmail-split-incoming
-                         file ',(intern (format "%s-save-mail" method))
-                         ',spool-func
-                         (or in-group
-                             (if (equal file orig-file)
-                                 nil
-                               (nnmail-get-split-group orig-file ',source)))
-                         ',(intern (format "%s-active-number" method)))))))
+                   (condition-case (cond)
+                       (mail-source-fetch
+                        source
+                        (gnus-byte-compile
+                         `(lambda (file orig-file)
+                            (nnmail-split-incoming
+                             file ',(intern (format "%s-save-mail" method))
+                             ',spool-func
+                             (or in-group
+                                 (if (equal file orig-file)
+                                     nil
+                                   (nnmail-get-split-group orig-file
+                                                           ',source)))
+                             ',(intern (format "%s-active-number" method))))))
+                     (error
+                      (message "Mail source %s failed: %s" source cond)
+                      0)))
          (incf total new)
          (incf i)))
       ;; If we did indeed read any incoming spools, we save all info.