From 18952b5ac0a0497378ae1462a8780b332d3cd859 Mon Sep 17 00:00:00 2001 From: "John J. Aylward" Date: Thu, 2 Nov 2017 22:32:24 -0400 Subject: [PATCH] fixes wrapped exceptions --- JSONArray.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/JSONArray.java b/JSONArray.java index 4864fd5..480b746 100644 --- a/JSONArray.java +++ b/JSONArray.java @@ -111,7 +111,7 @@ public class JSONArray implements Iterable { char nextChar = x.nextClean(); if (nextChar == 0) { // array is unclosed. No ']' found, instead EOF - throw new JSONException(x.syntaxError("Expected a ',' or ']'")); + throw x.syntaxError("Expected a ',' or ']'"); } if (nextChar != ']') { x.back(); @@ -126,12 +126,12 @@ public class JSONArray implements Iterable { switch (x.nextClean()) { case 0: // array is unclosed. No ']' found, instead EOF - throw new JSONException(x.syntaxError("Expected a ',' or ']'")); + throw x.syntaxError("Expected a ',' or ']'"); case ',': nextChar = x.nextClean(); if (nextChar == 0) { // array is unclosed. No ']' found, instead EOF - throw new JSONException(x.syntaxError("Expected a ',' or ']'")); + throw x.syntaxError("Expected a ',' or ']'"); } if (nextChar == ']') { return;