001package sec.web.json.utilities;
002
003/**
004 * The JSONException is thrown by the JSON.org classes when things are amiss.
005 * @author JSON.org
006 * @version 2010-12-24
007 */
008public class JSONException extends Exception {
009        private static final long serialVersionUID = 0;
010        private Throwable cause;
011
012    /**
013     * Constructs a JSONException with an explanatory message.
014     * @param message Detail about the reason for the exception.
015     */
016    public JSONException(String message) {
017        super(message);
018    }
019
020    public JSONException(Throwable cause) {
021        super(cause.getMessage());
022        this.cause = cause;
023    }
024
025    public Throwable getCause() {
026        return this.cause;
027    }
028}