From 191d4b53553fc07d64f54e3aa4f75bc4fbc4930d Mon Sep 17 00:00:00 2001 From: rycamosun Date: Wed, 29 Apr 2026 15:25:20 -0700 Subject: [PATCH] fix: replace bare std::exception throws with descriptive place holder messsages --- sqlitelib.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sqlitelib.h b/sqlitelib.h index 5905292..6cf18d5 100644 --- a/sqlitelib.h +++ b/sqlitelib.h @@ -24,7 +24,7 @@ namespace detail { inline void verify(int rc, int expected = SQLITE_OK) { if (rc != expected) { - throw std::exception(); + throw std::runtime_error(sqlite3_errstr(rc)); } } @@ -159,10 +159,10 @@ class Iterator { } else if (rc == SQLITE_DONE) { id_ = -1; } else { - throw std::exception(); // TODO: + throw std::runtime_error(sqlite3_errmsg(sqlite3_db_handle(stmt_))); // NOTE: Placeholders } } else { - throw std::exception(); // TODO: + throw std::logic_error("operator++ called on invalid iterator"); // NOTE: Placeholders } return *this; }