moved database path to try section
f664e09 parent: b2c4551 modified
app/src/main.cpp +1 -1 | @@ -154,8 +154,8 @@ auto getExecutablePath() -> std::filesystem::path { | ||
| 154 | 154 | } |
| 155 | 155 | |
| 156 | 156 | auto main(int argc, char const *argv[]) -> int { |
| 157 | - auto databasePath{ std::filesystem::path(getExecutablePath().parent_path().string() + "/data.db")}; | |
| 158 | 157 | try { |
| 158 | + auto databasePath{ std::filesystem::path(getExecutablePath().parent_path().string() + "/data.db")}; | |
| 159 | 159 | Database database{databasePath}; |
| 160 | 160 | games = database.getGames(); |
| 161 | 161 | |
| @@ -154,8 +154,8 @@ auto getExecutablePath() -> std::filesystem::path { | |||
| 154 | } | 154 | } |
| 155 | 155 | ||
| 156 | auto main(int argc, char const *argv[]) -> int { | 156 | auto main(int argc, char const *argv[]) -> int { |
| 157 | - auto databasePath{ std::filesystem::path(getExecutablePath().parent_path().string() + "/data.db")}; | ||
| 158 | try { | 157 | try { |
| 158 | + auto databasePath{ std::filesystem::path(getExecutablePath().parent_path().string() + "/data.db")}; | ||
| 159 | Database database{databasePath}; | 159 | Database database{databasePath}; |
| 160 | games = database.getGames(); | 160 | games = database.getGames(); |
| 161 | 161 | ||