From 9648fd286c16dc1b9154a7940820a5c7043b4836 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Sat, 19 Aug 2017 13:00:19 +0200 Subject: Display the correct error message when we fail to open the sqlite3 db fix #3290 --- src/database/database.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/database/database.cpp b/src/database/database.cpp index 85c675e..0068b24 100644 --- a/src/database/database.cpp +++ b/src/database/database.cpp @@ -25,7 +25,7 @@ void Database::open(const std::string& filename) auto res = sqlite3_open_v2(filename.data(), &new_db, SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, nullptr); if (res != SQLITE_OK) { - log_error("Failed to open database file ", filename, ": ", sqlite3_errmsg(Database::db)); + log_error("Failed to open database file ", filename, ": ", sqlite3_errmsg(new_db)); throw std::runtime_error(""); } Database::close(); -- cgit v1.2.3