Trying to prevent error

This commit is contained in:
Greg 2020-11-19 00:49:31 +01:00
parent 29593e7861
commit 56a52b2763

View file

@ -59,9 +59,14 @@ public class Rethink {
try { try {
return new JSONObject(response); return new JSONObject(response);
} catch (JSONException e) { } catch (JSONException e) {
e.printStackTrace(); insertUser(id);
System.out.println(response); String response2 = String.valueOf(r.table(table).get(id).toJson().run(conn).first());
return null; try {
return new JSONObject(response2);
} catch (JSONException ex) {
ex.printStackTrace();
return null;
}
} }
} }