log JSON data with exception

This commit is contained in:
Milos Kozak 2018-07-22 21:14:42 +02:00
parent 0616c16e9f
commit cede7dd4b9

View file

@ -676,7 +676,7 @@ public class DatabaseHelper extends OrmLiteSqliteOpenHelper {
.source(Source.NIGHTSCOUT); .source(Source.NIGHTSCOUT);
createOrUpdate(tempTarget); createOrUpdate(tempTarget);
} catch (JSONException e) { } catch (JSONException e) {
log.error("Unhandled exception", e); log.error("Unhandled exception: " + trJson.toString(), e);
} }
} }
@ -762,7 +762,7 @@ public class DatabaseHelper extends OrmLiteSqliteOpenHelper {
} }
} }
} catch (SQLException | JSONException e) { } catch (SQLException | JSONException e) {
log.error("Unhandled exception", e); log.error("Unhandled exception: " + trJson.toString(), e);
} }
} }
@ -967,7 +967,7 @@ public class DatabaseHelper extends OrmLiteSqliteOpenHelper {
createOrUpdate(tempBasal); createOrUpdate(tempBasal);
} }
} catch (JSONException e) { } catch (JSONException e) {
log.error("Unhandled exception", e); log.error("Unhandled exception: " + trJson.toString(), e);
} }
} }
@ -1345,7 +1345,7 @@ public class DatabaseHelper extends OrmLiteSqliteOpenHelper {
careportalEvent._id = trJson.getString("_id"); careportalEvent._id = trJson.getString("_id");
createOrUpdate(careportalEvent); createOrUpdate(careportalEvent);
} catch (SQLException | JSONException e) { } catch (SQLException | JSONException e) {
log.error("Unhandled exception", e); log.error("Unhandled exception: " + trJson.toString(), e);
} }
} }
@ -1520,7 +1520,7 @@ public class DatabaseHelper extends OrmLiteSqliteOpenHelper {
profileSwitch.profilePlugin = trJson.getString("profilePlugin"); profileSwitch.profilePlugin = trJson.getString("profilePlugin");
createOrUpdate(profileSwitch); createOrUpdate(profileSwitch);
} catch (JSONException e) { } catch (JSONException e) {
log.error("Unhandled exception", e); log.error("Unhandled exception: " + trJson.toString(), e);
} }
} }