diff --git a/src/main/java/com/rarchives/ripme/ripper/AbstractRipper.java b/src/main/java/com/rarchives/ripme/ripper/AbstractRipper.java index bedc371c..e7292fee 100644 --- a/src/main/java/com/rarchives/ripme/ripper/AbstractRipper.java +++ b/src/main/java/com/rarchives/ripme/ripper/AbstractRipper.java @@ -328,11 +328,15 @@ public abstract class AbstractRipper } catch (HttpStatusException e) { logger.error("Got exception while running ripper:", e); waitForThreads(); - sendUpdate(STATUS.RIP_ERRORED, "Status=" + e.getStatusCode() + ", URL=" + e.getUrl()); + sendUpdate(STATUS.RIP_ERRORED, "HTTP status code " + e.getStatusCode() + " for URL " + e.getUrl()); } catch (IOException e) { logger.error("Got exception while running ripper:", e); waitForThreads(); sendUpdate(STATUS.RIP_ERRORED, e.getMessage()); + } catch (Exception e) { + logger.error("Got exception while running ripper:", e); + waitForThreads(); + sendUpdate(STATUS.RIP_ERRORED, e.getMessage()); } finally { cleanup(); } diff --git a/src/main/java/com/rarchives/ripme/ripper/rippers/InstagramRipper.java b/src/main/java/com/rarchives/ripme/ripper/rippers/InstagramRipper.java index 95a2a0c9..9de14f86 100644 --- a/src/main/java/com/rarchives/ripme/ripper/rippers/InstagramRipper.java +++ b/src/main/java/com/rarchives/ripme/ripper/rippers/InstagramRipper.java @@ -9,6 +9,7 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; import org.json.JSONArray; +import org.json.JSONException; import org.json.JSONObject; import org.jsoup.nodes.Document; import org.jsoup.nodes.Element; @@ -109,7 +110,12 @@ public class InstagramRipper extends AbstractJSONRipper { String baseURL = "http://iconosquare.com/controller_nl.php?action=getPhotoUserPublic&user_id=" + userID; logger.info("Loading " + baseURL); - return Http.url(baseURL).getJSON(); + try { + JSONObject result = Http.url(baseURL).getJSON(); + return result; + } catch (JSONException e) { + throw new IOException("Could not get instagram user via iconosquare", e); + } } @Override