You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
819 B
30 lines
819 B
package com.github.jreddit.parser.exception;
|
|
|
|
import org.json.simple.parser.ParseException;
|
|
|
|
public class RedditParseException extends Exception {
|
|
|
|
private static final long serialVersionUID = -1031803118041533936L;
|
|
|
|
public RedditParseException(String custom) {
|
|
super("Could not parse response from reddit (" + custom + ")");
|
|
}
|
|
|
|
public RedditParseException(String custom, Throwable t) {
|
|
super("Could not parse response from reddit (" + custom + ")", t);
|
|
}
|
|
|
|
public RedditParseException() {
|
|
this("undefined (null) response");
|
|
}
|
|
|
|
public RedditParseException(int errorCode) {
|
|
this("contained HTTP error code: " + errorCode);
|
|
}
|
|
|
|
public RedditParseException(ParseException pe) {
|
|
this("invalid JSON format", pe);
|
|
}
|
|
|
|
}
|