Present 'database error' dialog in more situations

This commit is contained in:
Scott Nonnenberg 2019-02-27 10:17:22 -08:00
parent 812f895e12
commit ca5132f712

View file

@ -696,6 +696,7 @@ async function initialize({ configDir, key, messages }) {
filePath = path.join(dbDir, 'db.sqlite');
try {
const sqlInstance = await openDatabase(filePath);
const promisified = promisify(sqlInstance);
@ -714,7 +715,6 @@ async function initialize({ configDir, key, messages }) {
db = promisified;
// test database
try {
await getMessageCount();
} catch (error) {
console.log('Database startup error:', error.stack);