Skip to content

Commit

Permalink
log json fetching error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
illwieckz committed Aug 22, 2019
1 parent c35797c commit 8cf4ac7
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions News.qml
Expand Up @@ -25,10 +25,12 @@ Item {
try {
newsObj = JSON.parse(news.responseText);
} catch (error) {
console.log("failed to parse posts json")
console.log("failed to parse posts json with error: " + error.name);
console.log("message: " + error.message);
}
} else {
console.log("failed to fetch posts json")
console.log("failed to fetch posts json with code: " + news.status);
console.log("status: " + news.statusText);
}

if (newsObj === null) {
Expand Down Expand Up @@ -68,7 +70,7 @@ Item {
}
}

console.log("fetching recent posts JSON")
console.log("fetching recent posts json")
news.open('GET', 'http://www.unvanquished.net/?json=get_recent_posts');
news.send();
}
Expand Down

0 comments on commit 8cf4ac7

Please sign in to comment.