Mercurial > ambnews-firefox
comparison ambnews/content/blank.js @ 20:aa3ccc022d07
If displaying a feed throws an unexpected exception, we just log the error and move on to the next one.
| author | Atul Varma <varmaa@toolness.com> |
|---|---|
| date | Mon, 08 Sep 2008 15:59:53 -0700 |
| parents | f259d52d361e |
| children |
comparison
equal
deleted
inserted
replaced
| 19:a45124612e60 | 20:aa3ccc022d07 |
|---|---|
| 94 AmbNews.getFeed(feedUri, displayFeed); | 94 AmbNews.getFeed(feedUri, displayFeed); |
| 95 } | 95 } |
| 96 } | 96 } |
| 97 } | 97 } |
| 98 | 98 |
| 99 function displayFeed(feed) { | |
| 100 try { | |
| 101 tryToDisplayFeed(feed); | |
| 102 } catch (e) { | |
| 103 Components.utils.reportError(e); | |
| 104 window.setTimeout(getNextFeed, 10); | |
| 105 } | |
| 106 } | |
| 107 | |
| 99 // This function displays the given feed. | 108 // This function displays the given feed. |
| 100 function displayFeed(feed) { | 109 function tryToDisplayFeed(feed) { |
| 101 if (feed && feed.title.text in shownFeeds) | 110 if (feed && feed.title.text in shownFeeds) |
| 102 // We've already shown this feed, skip to the next one. | 111 // We've already shown this feed, skip to the next one. |
| 103 feed = null; | 112 feed = null; |
| 104 if (feed) { | 113 if (feed) { |
| 105 shownFeeds[feed.title.text] = true; | 114 shownFeeds[feed.title.text] = true; |
