Present 'database error' dialog in more situations
This commit is contained in:
parent
812f895e12
commit
ca5132f712
1 changed files with 18 additions and 18 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue