Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0759465

Browse files
author
Douglas Crockford
committed
RuntimeException
1 parent50c3afb commit0759465

File tree

1 file changed

+38
-28
lines changed

1 file changed

+38
-28
lines changed

‎JSONException.java

Lines changed: 38 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,38 @@
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+
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp