We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ceab01e commit 73ba422Copy full SHA for 73ba422
dist/rss-parser.js
@@ -53,8 +53,7 @@ Parser.parseURL = function(url, callback) {
53
54
try{ xhr = new XMLHttpRequest(); }catch(e){
55
try{ xhr = new ActiveXObject('Msxml2.XMLHTTP'); }catch (error){
56
- if (console) console.log('RSSParser: XMLHttpRequest not supported');
57
- return null;
+ callback(new Error('RSSParser: XMLHttpRequest not supported'));
58
}
59
60
requestTimeout = setTimeout(function() {
@@ -72,8 +71,12 @@ Parser.parseURL = function(url, callback) {
72
71
73
};
74
75
- xhr.open('GET', url, true);
76
- xhr.send();
+ try {
+ xhr.open('GET', url, true);
+ xhr.send();
77
+ } catch (err) {
78
+ callback(new Error(err));
79
+ }
80
81
82
Parser.parseFile = function(file, callback) {
0 commit comments