001 002 003/* 004Copyright (c) 2002 JSON.org 005 006Permission is hereby granted, free of charge, to any person obtaining a copy 007of this software and associated documentation files (the "Software"), to deal 008in the Software without restriction, including without limitation the rights 009to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 010copies of the Software, and to permit persons to whom the Software is 011furnished to do so, subject to the following conditions: 012 013The above copyright notice and this permission notice shall be included in all 014copies or substantial portions of the Software. 015 016The Software shall be used for Good, not Evil. 017 018THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 019IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 020FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 021AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 022LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 023OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 024SOFTWARE. 025*/ 026 027package armyc2.c5isr.web.json.utilities; 028 029/** 030 * The JSONException is thrown by the JSON.org classes when things are amiss. 031 * @author JSON.org 032 * @version 2010-12-24 033 */ 034public class JSONException extends Exception { 035 private static final long serialVersionUID = 0; 036 private Throwable cause; 037 038 /** 039 * Constructs a JSONException with an explanatory message. 040 * @param message Detail about the reason for the exception. 041 */ 042 public JSONException(String message) { 043 super(message); 044 } 045 046 public JSONException(Throwable cause) { 047 super(cause.getMessage()); 048 this.cause = cause; 049 } 050 051 public Throwable getCause() { 052 return this.cause; 053 } 054}