VFS error handling.

This commit is contained in:
Nuno Cruces
2025-10-15 16:22:36 +01:00
parent 9e1cbfb5bb
commit 1db4366226
21 changed files with 209 additions and 130 deletions

View File

@@ -198,14 +198,14 @@ func (ctx Context) ResultError(err error) {
return
}
msg, code := errorCode(err, _OK)
msg, code := errorCode(err, ERROR)
if msg != "" {
defer ctx.c.arena.mark()()
ptr := ctx.c.arena.string(msg)
ctx.c.call("sqlite3_result_error",
stk_t(ctx.handle), stk_t(ptr), stk_t(len(msg)))
}
if code != _OK {
if code != res_t(ERROR) {
ctx.c.call("sqlite3_result_error_code",
stk_t(ctx.handle), stk_t(code))
}