catch dberror

This commit is contained in:
Milos Kozak 2020-01-25 01:09:29 +01:00
parent 1680f190b0
commit 6c23cb1d29

View file

@ -47,7 +47,13 @@ public class UploadQueue {
NSClientService.handler.post(() -> { NSClientService.handler.post(() -> {
if (L.isEnabled(L.NSCLIENT)) if (L.isEnabled(L.NSCLIENT))
log.debug("Adding to queue: " + dbr.data); log.debug("Adding to queue: " + dbr.data);
MainApp.getDbHelper().create(dbr); try {
MainApp.getDbHelper().create(dbr);
} catch (Exception e) {
log.error("Unhandled exception", e);
dbr.nsClientID += "1";
MainApp.getDbHelper().create(dbr);
}
NSClientPlugin plugin = NSClientPlugin.getPlugin(); NSClientPlugin plugin = NSClientPlugin.getPlugin();
if (plugin != null) { if (plugin != null) {
plugin.resend("newdata"); plugin.resend("newdata");