mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-20 02:50:46 -06:00
Improve error handling when saving
Report any errors that might occur while saving changes to the database to the user. Also warn the user that this means the database wasn't saved entirely. See issue #770.
This commit is contained in:
@@ -1113,7 +1113,13 @@ void MainWindow::dbState( bool dirty )
|
||||
void MainWindow::fileSave()
|
||||
{
|
||||
if(db.isOpen())
|
||||
db.releaseAllSavepoints();
|
||||
{
|
||||
if(!db.releaseAllSavepoints())
|
||||
{
|
||||
QMessageBox::warning(this, QApplication::applicationName(), tr("Error while saving the database file. This means that not all changes to the database were "
|
||||
"saved. You need to resolve the following error first.\n\n%1").arg(db.lastErrorMessage));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::fileRevert()
|
||||
|
||||
Reference in New Issue
Block a user