Handle some errors.

This commit is contained in:
Nuno Cruces
2025-01-17 14:40:12 +00:00
parent 9132f74b69
commit 407e13d238
7 changed files with 34 additions and 18 deletions

View File

@@ -215,7 +215,9 @@ func (c *cursor) Filter(idxNum int, idxStr string, arg ...sqlite3.Value) error {
if curr.depth >= maxDepth {
continue
}
stmt.BindInt64(1, curr.id)
if err := stmt.BindInt64(1, curr.id); err != nil {
return err
}
for stmt.Step() {
if stmt.ColumnType(0) == sqlite3.INTEGER {
next := stmt.ColumnInt64(0)
@@ -225,7 +227,9 @@ func (c *cursor) Filter(idxNum int, idxStr string, arg ...sqlite3.Value) error {
}
}
}
stmt.Reset()
if err := stmt.Reset(); err != nil {
return err
}
}
return nil
}