Skip to content

Fixing incorrect dialog displayed on error

Tyler Sizse requested to merge issue_219_incorrect_dialog into master

RELATED ISSUES

Closes #219 (closed);

DESCRIPTION

Fixing issue #219 (closed) so that a error dialog is displayed to the user if an error occurs during database population. This should also prevent the user from being able to continue any further into the feature.

STEPS TO TEST

  1. 'Wipe Data' on your device using 'AVD Manager' so the app has to recreate the Nest.db database.
  2. Disconnect your device from the internet.
  3. Launch the app on that device.
  4. Click 'CHECK EXPIRATION DATE' button.

After a little while you should now see the error dialog and should be blocked from continuing any further.

NOTES:

  • Made new method to replace duplicate code
  • Fixed errors with NestDB.Destroy.sql
  • Removed unnecessary try-catch blocks
  • Made it so that other running BackgroundTask are interrupted when an error occurs
  • Destroyed the database if the database fails to populate so that the onCreate method has to be called again.
  • Added a variable that toggles whether or not to print executed sql statements to the log to help keep the log clean.

LABELS

NEST Component:Check-Expiration-Date type::bug status::done

Edited by Tyler Sizse

Merge request reports