1 package atg.taglib.json.util;
2
3 /**
4 * The JSONException is thrown by the JSON.org classes then things are amiss.
5 * @author JSON.org
6 * @version 2
7 */
8 public class JSONException extends Exception {
9 private static final long serialVersionUID = -8568311320601213161L;
10
11 private Throwable cause;
12
13 /**
14 * Constructs a JSONException with an explanatory message.
15 * @param message Detail about the reason for the exception.
16 */
17 public JSONException(String message) {
18 super(message);
19 }
20
21 public JSONException(Throwable t) {
22 super(t.getMessage());
23 this.cause = t;
24 }
25
26 public Throwable getCause() {
27 return this.cause;
28 }
29 }