summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlouiz’ <louiz@louiz.org>2017-08-19 13:00:19 +0200
committerlouiz’ <louiz@louiz.org>2017-08-19 13:02:13 +0200
commit9648fd286c16dc1b9154a7940820a5c7043b4836 (patch)
tree21e471b8961a9ed701a5ec08070e1ad0b8c7f629
parent5b0b41f40a3ef41657971e1538dfb508fd7e6be8 (diff)
downloadbiboumi-9648fd286c16dc1b9154a7940820a5c7043b4836.tar.gz
biboumi-9648fd286c16dc1b9154a7940820a5c7043b4836.tar.bz2
biboumi-9648fd286c16dc1b9154a7940820a5c7043b4836.tar.xz
biboumi-9648fd286c16dc1b9154a7940820a5c7043b4836.zip
Display the correct error message when we fail to open the sqlite3 db
fix #3290
-rw-r--r--src/database/database.cpp2
1 files changed, 1 insertions, 1 deletions
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();