File tree Expand file tree Collapse file tree 1 file changed +19
-17
lines changed Expand file tree Collapse file tree 1 file changed +19
-17
lines changed Original file line number Diff line number Diff line change 4
4
* The JSONException is thrown by the JSON.org classes when things are amiss.
5
5
*
6
6
* @author JSON.org
7
- * @version 2014-05-03
7
+ * @version 2015-10-14
8
8
*/
9
9
public class JSONException extends RuntimeException {
10
+ /** Serialization ID */
10
11
private static final long serialVersionUID = 0 ;
11
- private Throwable cause ;
12
12
13
13
/**
14
14
* Constructs a JSONException with an explanatory message.
15
15
*
16
16
* @param message
17
17
* Detail about the reason for the exception.
18
18
*/
19
- public JSONException (String message ) {
20
- super (message );
19
+ public JSONException (final String message ) {
20
+ super (message );
21
21
}
22
22
23
23
/**
24
- * Constructs a new JSONException with the specified cause.
25
- * @param cause The cause.
24
+ * Constructs a JSONException with an explanatory message and cause.
25
+ *
26
+ * @param message
27
+ * Detail about the reason for the exception.
28
+ * @param cause
29
+ * The cause.
26
30
*/
27
- public JSONException (Throwable cause ) {
28
- super (cause .getMessage ());
29
- this .cause = cause ;
31
+ public JSONException (final String message , final Throwable cause ) {
32
+ super (message , cause );
30
33
}
31
34
32
35
/**
33
- * Returns the cause of this exception or null if the cause is nonexistent
34
- * or unknown.
35
- *
36
- * @return the cause of this exception or null if the cause is nonexistent
37
- * or unknown.
36
+ * Constructs a new JSONException with the specified cause.
37
+ *
38
+ * @param cause
39
+ * The cause.
38
40
*/
39
- @ Override
40
- public Throwable getCause () {
41
- return this .cause ;
41
+ public JSONException (final Throwable cause ) {
42
+ super (cause .getMessage (), cause );
42
43
}
44
+
43
45
}
You can’t perform that action at this time.
0 commit comments