qgis-midvatten-plugin
qgis-midvatten-plugin copied to clipboard
catch sqlite errors
Whenever an update/revision of the database (INSERT, UPDATE, etc.) is interrupted due to some constraint violations - then the database connection must be closed.
Currently, these situations results in python errors with error message from sqlite driver what is wrong. Then you can identify the problem and try to fix it BUT there is still a locking python connection which prevents editing of the databse. Only way to unlock the databse is to restart qgis.
There is an obvious risk that the user reads the python-sqlite error message, opens the current SQLite table and make edits. When user press 'save edits', it is not allowed because the database is stilled locked by the processes raising the sqlite error message.