Skip to content

Commit

Permalink
Error handling on gonewild rips
Browse files Browse the repository at this point in the history
  • Loading branch information
4pr0n committed Mar 8, 2014
1 parent c48ebff commit 7c63f3a
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ public void rip() throws IOException {
.execute()
.body();
json = new JSONObject(jsonString);
if (json.has("error")) {
logger.error("Error while retrieving user posts:" + json.getString("error"));
break;
}
posts = json.getJSONArray("posts");
if (posts.length() == 0) {
break; // No more posts to get
Expand Down

0 comments on commit 7c63f3a

Please sign in to comment.