Compare commits

..

No commits in common. "b1565cf4404529e6c026ae98bfb3bf306ec26c84" and "4de4f7a0e95dff124076fe16359fa4355700540c" have entirely different histories.

View File

@ -1,6 +1,5 @@
package sh.adb.RandomRedditMemesAPI; package sh.adb.RandomRedditMemesAPI;
import com.github.jreddit.oauth.exception.RedditOAuthException;
import com.github.jreddit.parser.entity.Submission; import com.github.jreddit.parser.entity.Submission;
import com.github.jreddit.parser.exception.RedditParseException; import com.github.jreddit.parser.exception.RedditParseException;
import com.sun.net.httpserver.Headers; import com.sun.net.httpserver.Headers;
@ -63,7 +62,7 @@ class CommunityHandler implements HttpHandler {
List<Submission> submissions = null; List<Submission> submissions = null;
try { try {
submissions = this.api.getSub(pathArray[4]); submissions = this.api.getSub(pathArray[4]);
} catch (RedditParseException | RedditOAuthException e) { } catch (RedditParseException e) {
responseJSON.put("error", "invalid subreddit"); responseJSON.put("error", "invalid subreddit");
sendResponse(t, responseJSON.toString()); sendResponse(t, responseJSON.toString());
e.printStackTrace(); e.printStackTrace();