Also print sqlite's error message

This commit is contained in:
Sebastian Ramacher 2019-12-01 17:21:14 +01:00
parent af253296d9
commit 75bab3f525

View File

@ -75,7 +75,7 @@ prepare_statement(sqlite3* session, const char* statement)
sqlite3_stmt* pp_stmt = NULL;
if (sqlite3_prepare_v2(session, statement, -1, &pp_stmt, &pz_tail) != SQLITE_OK) {
girara_error("Failed to prepare query: %s", statement);
girara_error("Failed to prepare query: %s - %s", statement, sqlite3_errmsg(session));
sqlite3_finalize(pp_stmt);
return NULL;
} else if (pz_tail && *pz_tail != '\0') {