1 /*
2 * $Id: JSONException.java,v 1.1 2007/10/22 16:23:08 oeuillot Exp $
3 */
4 package org.rcfaces.core.internal.util.json;
5
6 /**
7 * The JSONException is thrown by the JSON.org classes then things are amiss.
8 *
9 * @author JSON.org
10 * @version 2
11 */
12 public class JSONException extends Exception {
13 private static final long serialVersionUID = 6890284447052696055L;
14
15 private final Throwable cause;
16
17 /**
18 * Constructs a JSONException with an explanatory message.
19 *
20 * @param message
21 * Detail about the reason for the exception.
22 */
23 public JSONException(String message) {
24 super(message);
25
26 this.cause = null;
27 }
28
29 public JSONException(Throwable t) {
30 super(t);
31
32 this.cause = t;
33 }
34
35 public Throwable getCause() {
36 return cause;
37 }
38 }