|
1 |
| -packageorg.json; |
2 |
| - |
3 |
| -/** |
4 |
| - * The JSONException is thrown by the JSON.org classes when things are amiss. |
5 |
| - * @author JSON.org |
6 |
| - * @version 2010-12-24 |
7 |
| - */ |
8 |
| -publicclassJSONExceptionextendsException { |
9 |
| -privatestaticfinallongserialVersionUID =0; |
10 |
| -privateThrowablecause; |
11 |
| - |
12 |
| -/** |
13 |
| - * Constructs a JSONException with an explanatory message. |
14 |
| - * @param message Detail about the reason for the exception. |
15 |
| - */ |
16 |
| -publicJSONException(Stringmessage) { |
17 |
| -super(message); |
18 |
| - } |
19 |
| - |
20 |
| -publicJSONException(Throwablecause) { |
21 |
| -super(cause.getMessage()); |
22 |
| -this.cause =cause; |
23 |
| - } |
24 |
| - |
25 |
| -publicThrowablegetCause() { |
26 |
| -returnthis.cause; |
27 |
| - } |
28 |
| -} |
| 1 | +packageorg.json; |
| 2 | + |
| 3 | +/** |
| 4 | + * The JSONException is thrown by the JSON.org classes when things are amiss. |
| 5 | + * |
| 6 | + * @author JSON.org |
| 7 | + * @version 2013-02-10 |
| 8 | + */ |
| 9 | +publicclassJSONExceptionextendsRuntimeException { |
| 10 | +privatestaticfinallongserialVersionUID =0; |
| 11 | +privateThrowablecause; |
| 12 | + |
| 13 | +/** |
| 14 | + * Constructs a JSONException with an explanatory message. |
| 15 | + * |
| 16 | + * @param message |
| 17 | + * Detail about the reason for the exception. |
| 18 | + */ |
| 19 | +publicJSONException(Stringmessage) { |
| 20 | +super(message); |
| 21 | + } |
| 22 | + |
| 23 | +/** |
| 24 | + * Constructs a new JSONException with the specified cause. |
| 25 | + */ |
| 26 | +publicJSONException(Throwablecause) { |
| 27 | +super(cause.getMessage()); |
| 28 | +this.cause =cause; |
| 29 | + } |
| 30 | + |
| 31 | +/** |
| 32 | + * Returns the cause of this throwable or null if the cause is nonexistent or unknown. |
| 33 | + * @returns the cause of this throwable or null if the cause is nonexistent or unknown. |
| 34 | + */ |
| 35 | +publicThrowablegetCause() { |
| 36 | +returnthis.cause; |
| 37 | + } |
| 38 | +} |