Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions hdr/sqlite_modern_cpp.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,6 @@ namespace sqlite {
else if(error_code == SQLITE_NOTADB) throw exceptions::notadb(sqlite3_errstr(error_code));
else throw sqlite_exception(sqlite3_errstr(error_code));
}

static void throw_custom_error(const char* str) {
throw std::runtime_error(str);
}

}

class database;
Expand Down Expand Up @@ -174,11 +169,11 @@ namespace sqlite {
if((hresult = sqlite3_step(_stmt.get())) == SQLITE_ROW) {
call_back();
} else if(hresult == SQLITE_DONE) {
exceptions::throw_custom_error("no rows to extract: exactly 1 row expected");
throw exceptions::no_rows("no rows to extract: exactly 1 row expected");
}

if((hresult = sqlite3_step(_stmt.get())) == SQLITE_ROW) {
exceptions::throw_custom_error("not all rows extracted");
throw exceptions::more_rows("not all rows extracted");
}

if(hresult != SQLITE_DONE) {
Expand Down