Commit 89fe1b53 authored by gwenn's avatar gwenn

Improves error message in Stmt.Bind

parent f794138c
...@@ -346,7 +346,8 @@ func (s *Stmt) BindByIndex(index int, value interface{}) error { ...@@ -346,7 +346,8 @@ func (s *Stmt) BindByIndex(index int, value interface{}) error {
case ZeroBlobLength: case ZeroBlobLength:
rv = C.sqlite3_bind_zeroblob(s.stmt, i, C.int(value)) rv = C.sqlite3_bind_zeroblob(s.stmt, i, C.int(value))
default: default:
return s.specificError("unsupported type in Bind: %T", value) name, _ := s.BindParameterName(index)
return s.specificError("unsupported type in Bind: %T (index: %d, name: %q)", value, index, name)
} }
return s.error(rv, "Stmt.Bind") return s.error(rv, "Stmt.Bind")
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment