commit a603ae1268b79423440840dfd89ecaec821391cb
parent aa071962b81d60485d5c4032d5e49ec0c92d1116
Author: Florian Dold <florian@dold.me>
Date: Fri, 12 Jan 2024 14:35:09 +0100
log calls to sqlite3_reset
Diffstat:
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/tart_module.c b/tart_module.c
@@ -1860,6 +1860,7 @@ static JSValue js_sqlite3_stmt_run(JSContext *ctx, JSValue this_val,
db = sqlite3_db_handle(stmt);
sqlret = sqlite3_reset(stmt);
if (SQLITE_OK != sqlret) {
+ fprintf("sqlite3_reset failed (in stmt_run): %s\n", sqlite3_errmsg(db));
ret_val = JS_ThrowTypeError(ctx, "failed to reset");
goto done;
}
@@ -1969,6 +1970,7 @@ static JSValue js_sqlite3_stmt_get_all(JSContext *ctx, JSValue this_val,
db = sqlite3_db_handle(stmt);
sqlret = sqlite3_reset(stmt);
if (SQLITE_OK != sqlret) {
+ fprintf("sqlite3_reset failed (in stmt_get_all): %s\n", sqlite3_errmsg(db));
ret_val = JS_ThrowTypeError(ctx, "failed to reset");
goto done;
}
@@ -2029,6 +2031,7 @@ static JSValue js_sqlite3_stmt_get_first(JSContext *ctx, JSValue this_val,
db = sqlite3_db_handle(stmt);
sqlret = sqlite3_reset(stmt);
if (SQLITE_OK != sqlret) {
+ fprintf("sqlite3_reset failed (in stmt_get_first): %s\n", sqlite3_errmsg(db));
ret_val = JS_ThrowTypeError(ctx, "failed to reset");
goto done;
}