Skip to content

Commit

Permalink
rev: remove statement output from sqlite_error calls
Browse files Browse the repository at this point in the history
changes per #522 (comment)
  • Loading branch information
program-- authored and mattw-nws committed Jul 18, 2023
1 parent 65b181d commit 76f7bdf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/geopackage/sqlite/database.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ sqlite_iter sqlite::query(const std::string& statement)
if (code != SQLITE_OK) {
// something happened, can probably switch on result codes
// https://www.sqlite.org/rescode.html
throw sqlite_error("sqlite3_prepare_v2", code, "(query: " + statement + ")");
throw sqlite_error("sqlite3_prepare_v2", code);
}

return sqlite_iter(std::move(stmt_t(stmt)));
Expand All @@ -70,7 +70,7 @@ sqlite_iter sqlite::query(const std::string& statement, const std::vector<std::s
const int code = sqlite3_prepare_v2(this->connection(), cstmt, statement.length() + 1, &stmt, NULL);

if (code != SQLITE_OK) {
throw sqlite_error("sqlite3_prepare_v2", code, "(query: " + statement + ")");
throw sqlite_error("sqlite3_prepare_v2", code);
}

if (!binds.empty()) {
Expand All @@ -93,7 +93,7 @@ inline sqlite_iter sqlite::query(const std::string& statement, T const&... param
const int code = sqlite3_prepare_v2(this->connection(), cstmt, statement.length() + 1, &stmt, NULL);

if (code != SQLITE_OK) {
throw sqlite_error("sqlite3_prepare_v2", code, "(query: " + statement + ")");
throw sqlite_error("sqlite3_prepare_v2", code);
}

std::vector<std::string> binds{ { params... } };
Expand Down

0 comments on commit 76f7bdf

Please sign in to comment.