debug, add RedditOAuthException

master
adb 3 years ago
parent 1cb5fe33be
commit 3b1f5c2ad9

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

Loading…
Cancel
Save