source: osm/applications/editors/josm/plugins/geochat/src/org/json/JSONException.java@ 29540

Last change on this file since 29540 was 29540, checked in by zverik, 11 years ago

initial plugin commit; probably doesn't work

File size: 1022 bytes
Line 
1package org.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 */
9public class JSONException extends RuntimeException {
10 private static final long serialVersionUID = 0;
11 private Throwable cause;
12
13 /**
14 * Constructs a JSONException with an explanatory message.
15 *
16 * @param message
17 * Detail about the reason for the exception.
18 */
19 public JSONException(String message) {
20 super(message);
21 }
22
23 /**
24 * Constructs a new JSONException with the specified cause.
25 */
26 public JSONException(Throwable cause) {
27 super(cause.getMessage());
28 this.cause = cause;
29 }
30
31 /**
32 * Returns the cause of this exception or null if the cause is nonexistent
33 * or unknown.
34 *
35 * @returns the cause of this exception or null if the cause is nonexistent
36 * or unknown.
37 */
38 public Throwable getCause() {
39 return this.cause;
40 }
41}
Note: See TracBrowser for help on using the repository browser.