debug, add RedditOAuthException
This commit is contained in:
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…
Reference in New Issue
Block a user