changeset 96542:4b75a9224462

newsticker: handle url-retrieve errors.
author Ulf Jasper <ulf.jasper@web.de>
date Mon, 07 Jul 2008 17:34:38 +0000
parents d39625535543
children 404cde7e4828
files lisp/ChangeLog lisp/net/newst-backend.el
diffstat 2 files changed, 13 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Mon Jul 07 16:59:39 2008 +0000
+++ b/lisp/ChangeLog	Mon Jul 07 17:34:38 2008 +0000
@@ -1,3 +1,9 @@
+2008-07-07  Ulf Jasper  <ulf@web.de>
+
+	* net/newst-backend.el (newsticker--get-news-by-url): Catch errors
+	from url-retrieve.
+	(newsticker--sentinel-work): Fixed xerror typo.
+
 2008-07-07  Dan Nicolaescu  <dann@ics.uci.edu>
 
 	* vc-dir.el (vc-dir-refresh): Only update files.
--- a/lisp/net/newst-backend.el	Mon Jul 07 16:59:39 2008 +0000
+++ b/lisp/net/newst-backend.el	Mon Jul 07 17:34:38 2008 +0000
@@ -7,7 +7,7 @@
 ;; Filename:    newst-backend.el
 ;; URL:         http://www.nongnu.org/newsticker
 ;; Keywords:    News, RSS, Atom
-;; Time-stamp:  "13. Juni 2008, 17:41:00 (ulf)"
+;; Time-stamp:  "7. Juli 2008, 19:20:10 (ulf)"
 
 ;; ======================================================================
 
@@ -742,7 +742,11 @@
   "Get news for the site FEED-NAME from address URL using `url-retrieve'.
 See `newsticker-get-news'."
   (let ((coding-system-for-read 'no-conversion))
-    (url-retrieve url 'newsticker--get-news-by-url-callback (list feed-name)))
+    (condition-case error-data
+        (url-retrieve url 'newsticker--get-news-by-url-callback 
+                      (list feed-name))
+          (error (message "Error retrieving news from %s: %s" feed-name
+                          error-data))))
   (force-mode-line-update))
 
 (defun newsticker--get-news-by-url-callback (status feed-name)
@@ -999,7 +1003,7 @@
                                          (xml-node-name topnode) name)
                   nil))
                 (setq something-was-added t))
-          (xerror (message "sentinelerror in %s: %s" name error-data)))
+          (error (message "sentinelerror in %s: %s" name error-data)))
 
         ;; Remove those old items from cache which have been removed from
         ;; the feed