Crash auto recovery

in the worst way possible
This commit is contained in:
Natsumi
2025-12-23 00:43:04 +13:00
parent 9b20d62a90
commit 3a8627fd0e
6 changed files with 46 additions and 23 deletions

View File

@@ -33,7 +33,10 @@ class SQLiteService {
}
).catch(() => {});
}
if (e.message.includes('database is locked')) {
if (
e.message.includes('database is locked') ||
e.message.includes('attempt to write a readonly database')
) {
ElMessageBox.alert(
'Please close other applications that might be using the database file.',
'Database is locked',
@@ -43,6 +46,16 @@ class SQLiteService {
}
).catch(() => {});
}
if (e.message.includes('disk I/O error')) {
ElMessageBox.alert(
'Please check your disk for errors.',
'Disk I/O error',
{
confirmButtonText: 'OK',
type: 'warning'
}
).catch(() => {});
}
}
throw e;
}