mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-27 20:41:58 +03:00
wasm: DB.wrapHandle() no longer accepts a DB object as its first argument, as there's no apparent use case for proxying one DB object with another. Doc improvements for the new code.
FossilOrigin-Name: 0ee19db02a9b9320681d4393d9ba52889d149eac8ee114fc7b7f52a57271c139
This commit is contained in:
@ -221,7 +221,7 @@ globalThis.sqlite3InitModule = sqlite3InitModule;
|
||||
else if(filter instanceof Function) pass = filter(err);
|
||||
else if('string' === typeof filter) pass = (err.message === filter);
|
||||
if(!pass){
|
||||
throw new Error(msg || ("Filter rejected this exception: "+err.message));
|
||||
throw new Error(msg || ("Filter rejected this exception: <<"+err.message+">>"));
|
||||
}
|
||||
return this;
|
||||
},
|
||||
@ -1219,7 +1219,10 @@ globalThis.sqlite3InitModule = sqlite3InitModule;
|
||||
function do not interfere with downstream tests, e.g. by
|
||||
closing this.db.pointer. */
|
||||
//sqlite3.config.debug("Proxying",this.db);
|
||||
let dw = sqlite3.oo1.DB.wrapHandle(this.db);
|
||||
const misuseMsg = "SQLITE_MISUSE: Argument must be a WASM sqlite3 pointer";
|
||||
T.mustThrowMatching(()=>sqlite3.oo1.DB.wrapHandle(this.db), misuseMsg)
|
||||
.mustThrowMatching(()=>sqlite3.oo1.DB.wrapHandle(0), misuseMsg);
|
||||
let dw = sqlite3.oo1.DB.wrapHandle(this.db.pointer);
|
||||
//sqlite3.config.debug('dw',dw);
|
||||
T.assert( dw, '!!dw' )
|
||||
.assert( dw instanceof sqlite3.oo1.DB, 'dw is-a oo1.DB' )
|
||||
|
Reference in New Issue
Block a user