Handle SQLite errors

Should indicate the error occurring on #245.
This commit is contained in:
Hugo Manrique
2021-04-21 22:29:57 +02:00
parent 8635ce773f
commit a33f417457
2 changed files with 48 additions and 12 deletions

View File

@ -22,10 +22,10 @@ class App {
this.database = new Database(this)
// Setup database instance
this.database.ensureIndexes()
this.database.loadGraphPoints(config.graphDuration, () => {
this.database.loadRecords(callback)
this.database.ensureIndexes(() => {
this.database.loadGraphPoints(config.graphDuration, () => {
this.database.loadRecords(callback)
})
})
}