Skip to content

Commit

Permalink
Catch errors when calling populate_date_sort_field()
Browse files Browse the repository at this point in the history
  • Loading branch information
minorsecond committed Oct 21, 2022
1 parent 871b8a8 commit cefbd6a
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
Expand Up @@ -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);
Expand Down

0 comments on commit cefbd6a

Please sign in to comment.