Code Quality Improvement - Exception handlers should preserve the original exception

Update

Update
This commit is contained in:
Christian Ivan
2015-12-03 12:20:29 +07:00
parent 86898db7b1
commit 2143774a1e
4 changed files with 21 additions and 3 deletions

View File

@@ -7,6 +7,7 @@ import org.json.JSONTokener;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
public class Parser {
@@ -227,6 +228,7 @@ public class Parser {
str.charAt(++i);
p.data = new JSONTokener(str.substring(i)).nextValue();
} catch (JSONException e) {
logger.log(Level.WARNING, "An error occured while retrieving data from JSONTokener", e);
return error();
}
}