Better errors for bun:sqlite (#7906)

* Better errors for bun:sqlite

* Add `byteOffset`

* Add `code` property

* Fix error

* Update test

* Add a couple more tests for errors

* Add file with sqlite error codes

* Report extra memory from `sqlite3_stmt`

* Add polyfills for macOS x64

* Use -1 when unavailable

---------

Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
This commit is contained in:
Jarred Sumner
2023-12-29 18:37:16 -08:00
committed by GitHub
parent 05f14c8d6a
commit 135039b137
7 changed files with 1023 additions and 45 deletions

View File

@@ -2878,7 +2878,7 @@ pub const VirtualMachine = struct {
const show = Show{
.system_code = !exception.system_code.eql(name) and !exception.system_code.isEmpty(),
.syscall = !exception.syscall.isEmpty(),
.errno = exception.errno < 0,
.errno = exception.errno != 0,
.path = !exception.path.isEmpty(),
.fd = exception.fd != -1,
};