diff --git a/app/src/main/java/info/nightscout/androidaps/db/DatabaseHelper.java b/app/src/main/java/info/nightscout/androidaps/db/DatabaseHelper.java index dd93397ac3..073f21e708 100644 --- a/app/src/main/java/info/nightscout/androidaps/db/DatabaseHelper.java +++ b/app/src/main/java/info/nightscout/androidaps/db/DatabaseHelper.java @@ -550,12 +550,8 @@ public class DatabaseHelper extends OrmLiteSqliteOpenHelper { // ------------- DbRequests handling ------------------- - public void create(DbRequest dbr) { - try { + public void create(DbRequest dbr) throws SQLException { getDaoDbRequest().create(dbr); - } catch (SQLException e) { - log.error("Unhandled exception", e); - } } public int delete(DbRequest dbr) { diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/nsclient/UploadQueue.java b/app/src/main/java/info/nightscout/androidaps/plugins/general/nsclient/UploadQueue.java index 0fd3dcc345..f513f12756 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/nsclient/UploadQueue.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/nsclient/UploadQueue.java @@ -52,7 +52,11 @@ public class UploadQueue { } catch (Exception e) { log.error("Unhandled exception", e); dbr.nsClientID += "1"; - MainApp.getDbHelper().create(dbr); + try { + MainApp.getDbHelper().create(dbr); + } catch (Exception e1) { + log.error("Unhandled exception", e1); + } } NSClientPlugin plugin = NSClientPlugin.getPlugin(); if (plugin != null) {