aboutsummaryrefslogtreecommitdiff
path: root/ext/wasm/api/sqlite3-api-cleanup.js
diff options
context:
space:
mode:
authorstephan <stephan@noemail.net>2022-09-30 20:35:37 +0000
committerstephan <stephan@noemail.net>2022-09-30 20:35:37 +0000
commite67a0f40e419f4945d8157cb047ae302bf1f2852 (patch)
treea31e7863c9e6867e74ce53be5545eef1e5e02c9a /ext/wasm/api/sqlite3-api-cleanup.js
parentd18f1bbfe06e40713de908cd894d9857f6c11606 (diff)
downloadsqlite-e67a0f40e419f4945d8157cb047ae302bf1f2852.tar.gz
sqlite-e67a0f40e419f4945d8157cb047ae302bf1f2852.zip
Add JS wrapper for sqlite3_exec() which knows how to handle a JS callback. Add some console.error() reporting of module-load failures, as they otherwise often get silently swallowed up by the loader's mechanisms. Add 'flexible-string' JS-to-WASM argument converter which performs more X-to-string conversions than the 'string' arg converter does.
FossilOrigin-Name: 96818aa83f4ccc574f558231249ecbdd39763b4351cf4cf6d33f53774a3ee5e6
Diffstat (limited to 'ext/wasm/api/sqlite3-api-cleanup.js')
-rw-r--r--ext/wasm/api/sqlite3-api-cleanup.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/wasm/api/sqlite3-api-cleanup.js b/ext/wasm/api/sqlite3-api-cleanup.js
index 12d766886..c2a342589 100644
--- a/ext/wasm/api/sqlite3-api-cleanup.js
+++ b/ext/wasm/api/sqlite3-api-cleanup.js
@@ -46,6 +46,9 @@ if('undefined' !== typeof Module){ // presumably an Emscripten build
let sqlite3;
try{
sqlite3 = self.sqlite3ApiBootstrap();
+ }catch(e){
+ console.error("sqlite3ApiBootstrap() error:",e);
+ throw e;
}finally{
delete self.sqlite3ApiBootstrap;
if(rmApiConfig) delete self.sqlite3ApiConfig;