mirror of
https://github.com/ethauvin/JSON-java.git
synced 2025-06-17 07:50:52 -07:00
fixes wrapped exceptions
This commit is contained in:
parent
d2a66a4287
commit
18952b5ac0
1 changed files with 3 additions and 3 deletions
|
@ -111,7 +111,7 @@ public class JSONArray implements Iterable<Object> {
|
||||||
char nextChar = x.nextClean();
|
char nextChar = x.nextClean();
|
||||||
if (nextChar == 0) {
|
if (nextChar == 0) {
|
||||||
// array is unclosed. No ']' found, instead EOF
|
// array is unclosed. No ']' found, instead EOF
|
||||||
throw new JSONException(x.syntaxError("Expected a ',' or ']'"));
|
throw x.syntaxError("Expected a ',' or ']'");
|
||||||
}
|
}
|
||||||
if (nextChar != ']') {
|
if (nextChar != ']') {
|
||||||
x.back();
|
x.back();
|
||||||
|
@ -126,12 +126,12 @@ public class JSONArray implements Iterable<Object> {
|
||||||
switch (x.nextClean()) {
|
switch (x.nextClean()) {
|
||||||
case 0:
|
case 0:
|
||||||
// array is unclosed. No ']' found, instead EOF
|
// array is unclosed. No ']' found, instead EOF
|
||||||
throw new JSONException(x.syntaxError("Expected a ',' or ']'"));
|
throw x.syntaxError("Expected a ',' or ']'");
|
||||||
case ',':
|
case ',':
|
||||||
nextChar = x.nextClean();
|
nextChar = x.nextClean();
|
||||||
if (nextChar == 0) {
|
if (nextChar == 0) {
|
||||||
// array is unclosed. No ']' found, instead EOF
|
// array is unclosed. No ']' found, instead EOF
|
||||||
throw new JSONException(x.syntaxError("Expected a ',' or ']'"));
|
throw x.syntaxError("Expected a ',' or ']'");
|
||||||
}
|
}
|
||||||
if (nextChar == ']') {
|
if (nextChar == ']') {
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue