Skip to content

Commit

Permalink
Merge pull request #501 from minorsecond/patch/populate-date-sort-fie…
Browse files Browse the repository at this point in the history
…ld-after-db-init

Catch errors when calling populate_date_sort_field()
minorsecond authored Oct 21, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
2 parents 871b8a8 + cefbd6a commit a169800
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/database.cpp
Original file line number Diff line number Diff line change
@@ -239,7 +239,11 @@ int Database::increment_version(Storage storage, int current_version) {
* @return: An integer denoting new DB version, straight from the DB.
*/

populate_date_sort_field(storage);
try {
populate_date_sort_field(storage);
} catch (std::system_error &e) {
std::cout << e.what() << std::endl;
}

std::cout << "Using DB version " << storage.pragma.user_version() << std::endl;
const int version = get_version(storage);

0 comments on commit a169800

Please sign in to comment.