From: Otto Moerbeek Date: Mon, 4 May 2020 09:08:26 +0000 (+0200) Subject: sqlite3_exec does not return SQLITE_DONE or SQLITE_ROW plus one forgottten throw X-Git-Tag: dnsdist-1.5.0-rc2~2^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4482ac793ee105c55803709b6efb51d23576c3b3;p=thirdparty%2Fpdns.git sqlite3_exec does not return SQLITE_DONE or SQLITE_ROW plus one forgottten throw conversion --- diff --git a/pdns/ssqlite3.cc b/pdns/ssqlite3.cc index b36a256e6b..8fc9466a43 100644 --- a/pdns/ssqlite3.cc +++ b/pdns/ssqlite3.cc @@ -249,13 +249,11 @@ void SSQLite3::execute(const string& query) { if (rc != SQLITE_OK) { errstr2 = errmsg; sqlite3_free(errmsg); - } - if (rc != SQLITE_OK && rc != SQLITE_DONE && rc != SQLITE_ROW) { throw SSqlException("Failed to execute query: " + errstr2); } } } else if (rc != SQLITE_OK) { - throw("Failed to execute query: " + errstr1); + throw SSqlException("Failed to execute query: " + errstr1); } }