Skip to content

Commit de9bb36

Browse files
committed
Add error codes for no_row and more_rows
1 parent 0669af2 commit de9bb36

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

hdr/sqlite_modern_cpp.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,11 +188,11 @@ namespace sqlite {
188188
if((hresult = sqlite3_step(_stmt.get())) == SQLITE_ROW) {
189189
call_back();
190190
} else if(hresult == SQLITE_DONE) {
191-
throw exceptions::no_rows("no rows to extract: exactly 1 row expected");
191+
throw exceptions::no_rows("no rows to extract: exactly 1 row expected", SQLITE_DONE);
192192
}
193193

194194
if((hresult = sqlite3_step(_stmt.get())) == SQLITE_ROW) {
195-
throw exceptions::more_rows("not all rows extracted");
195+
throw exceptions::more_rows("not all rows extracted", SQLITE_ROW);
196196
}
197197

198198
if(hresult != SQLITE_DONE) {

0 commit comments

Comments
 (0)