debug, add RedditOAuthException

This commit is contained in:
adb 2021-01-31 13:35:26 +01:00
parent 1cb5fe33be
commit 3b1f5c2ad9

View File

@ -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();