Gnus development mailing list
 help / color / mirror / Atom feed
From: Mark Plaksin <happy@mcplaksin.org>
Subject: PATCH:  Make nnrss fail gracefully when it can't fetch a feed
Date: Wed, 21 Dec 2005 12:57:17 -0500	[thread overview]
Message-ID: <87y82e1gg2.fsf@stone.tss.usg.edu> (raw)

[-- Attachment #1: Type: text/plain, Size: 474 bytes --]

When nnrss can't fetch a feed an error is signalled.  This patch makes
nnrss print a warning instead.

When you use 'g' from the Group buffer, the current behavior prevents the
rest of your feeds from being checked.  The root cause is the use of
`(error)' in mm-url-insert-file-contents-external.  This patch just adds a
condition-case in nnrss.el.

I don't know whether I used the right -message function.  What's the
difference between nnheader-message and gnus-message?


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: nnrss.el --]
[-- Type: text/x-patch, Size: 569 bytes --]

--- nnrss.el.orig	2005-12-21 12:43:03.000000000 -0500
+++ nnrss.el	2005-12-21 12:43:13.000000000 -0500
@@ -380,7 +380,9 @@
 	;; FIXME: shouldn't binding `coding-system-for-read' be moved
 	;; to `mm-url-insert'?
 	(let ((coding-system-for-read 'binary))
-	  (mm-url-insert url)))
+          (condition-case nil
+              (mm-url-insert url)
+            (error (nnheader-message 3 "nnrss: Failed to fetch %s" url)))))
       (nnheader-remove-cr-followed-by-lf)
       ;; Decode text according to the encoding attribute.
       (when (setq cs (nnrss-get-encoding))

             reply	other threads:[~2005-12-21 17:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-21 17:57 Mark Plaksin [this message]
2005-12-21 18:28 ` Mark Plaksin
2005-12-22  3:38 ` Katsumi Yamaoka
2005-12-22 13:50   ` Mark Plaksin
2005-12-22 14:49     ` Katsumi Yamaoka
2005-12-31 15:49       ` Mark Plaksin
2006-01-01  6:46         ` Katsumi Yamaoka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y82e1gg2.fsf@stone.tss.usg.edu \
    --to=happy@mcplaksin.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).