Merge pull request #255 from DevFactory/release/exception-handlers-fix-1

Code Quality Improvement - Exception handlers should preserve the original exception
This commit is contained in:
Naoyuki Kanezawa
2015-12-18 11:42:36 +09:00
4 changed files with 21 additions and 3 deletions

View File

@@ -10,6 +10,7 @@ import org.json.JSONException;
import org.json.JSONObject;
import java.util.*;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
@@ -464,6 +465,7 @@ public class Socket extends Emitter {
try {
v = array.get(i);
} catch (JSONException e) {
logger.log(Level.WARNING, "An error occured while retrieving data from JSONArray", e);
v = null;
}
data[i] = v == JSONObject.NULL ? null : v;