Bug 1152412 - Handle errors downloading and parsing documents for reader view. r=bnicholson a=lmandel
This commit is contained in:
@@ -258,6 +258,9 @@ let ReaderParent = {
|
||||
* @resolves JS object representing the article, or null if no article is found.
|
||||
*/
|
||||
_getArticle: Task.async(function* (url, browser) {
|
||||
return yield ReaderMode.downloadAndParseDocument(url);
|
||||
return yield ReaderMode.downloadAndParseDocument(url).catch(e => {
|
||||
Cu.reportError("Error downloading and parsing document: " + e);
|
||||
return null;
|
||||
});
|
||||
})
|
||||
};
|
||||
|
||||
@@ -285,7 +285,10 @@ let Reader = {
|
||||
|
||||
// Article hasn't been found in the cache, we need to
|
||||
// download the page and parse the article out of it.
|
||||
return yield ReaderMode.downloadAndParseDocument(url);
|
||||
return yield ReaderMode.downloadAndParseDocument(url).catch(e => {
|
||||
Cu.reportError("Error downloading and parsing document: " + e);
|
||||
return null;
|
||||
});;
|
||||
}),
|
||||
|
||||
_getSavedArticle: function(browser) {
|
||||
|
||||
Reference in New Issue
Block a user