quickjs-tart

quickjs-based runtime for wallet-core logic
Log | Files | Refs | README | LICENSE

commit ced5d642ad658291d1ce0a7b31ba4f4470a1024d
parent 30d4063d0cfca260dd9f820ed3ea369549f02e58
Author: Florian Dold <florian@dold.me>
Date:   Tue, 22 Aug 2023 09:45:31 +0200

fix wrong return value

Diffstat:
Mtart_module.c | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tart_module.c b/tart_module.c @@ -1713,13 +1713,13 @@ static JSValue js_sqlite3_exec(JSContext *ctx, JSValue this_val, } res = sqlite3_exec(sqlite3_db, stmt_cstr, &sql_exec_cb, NULL, &errmsg); if (SQLITE_OK != res) { - // FIXME: throw! - printf("got error: %s\n", errmsg); + throw_sqlite3_error(ctx, sqlite3_db); + goto exception; } done: sqlite3_free(errmsg); JS_FreeCString(ctx, stmt_cstr); - return JS_UNDEFINED; + return ret_val; exception: ret_val = JS_EXCEPTION; goto done;