Pressing the buttons in order (create, fill, read) works ok.
Delete the database file test.db
Press to fill the db >> an empty zero byte test.db file is created.
Press to read the database, crash on db.open because test.db is not a valid db file
Additional context
This is obviously a non-real-world example, but I have had an issue where the database file was unavailable and the fill/read process did happen and cause the result.
Environment:
Issue description: Trying to open a corrupted / non-sqlite file crashes the project. Expecting to trap the error and handle it safely
Steps to reproduce: Create 3 buttons: create db, fill db, read db
Pressing the buttons in order (create, fill, read) works ok. Delete the database file
test.db
Press to fill the db >> an empty zero bytetest.db
file is created. Press to read the database, crash ondb.open
becausetest.db
is not a valid db fileAdditional context This is obviously a non-real-world example, but I have had an issue where the database file was unavailable and the fill/read process did happen and cause the result.