001package org.json; 002 003/** 004 * The JSONException is thrown by the JSON.org classes when things are amiss. 005 * 006 * @author JSON.org 007 * @version 2015-12-09 008 */ 009public class JSONException extends RuntimeException { 010 /** Serialization ID */ 011 private static final long serialVersionUID = 0; 012 013 /** 014 * Constructs a JSONException with an explanatory message. 015 * 016 * @param message 017 * Detail about the reason for the exception. 018 */ 019 public JSONException(final String message) { 020 super(message); 021 } 022 023 /** 024 * Constructs a JSONException with an explanatory message and cause. 025 * 026 * @param message 027 * Detail about the reason for the exception. 028 * @param cause 029 * The cause. 030 */ 031 public JSONException(final String message, final Throwable cause) { 032 super(message, cause); 033 } 034 035 /** 036 * Constructs a new JSONException with the specified cause. 037 * 038 * @param cause 039 * The cause. 040 */ 041 public JSONException(final Throwable cause) { 042 super(cause.getMessage(), cause); 043 } 044 045}