Version
main
Platform
Subsystem
sqlite
What steps will reproduce the bug?
import{DatabaseSync}from'node:sqlite';constsource=newDatabaseSync(':memory:');consttarget=newDatabaseSync(':memory:');source.exec('CREATE TABLE t (id INTEGER PRIMARY KEY)');target.exec('CREATE TABLE t (id INTEGER PRIMARY KEY)');constsession=source.createSession();source.exec('INSERT INTO t VALUES (1)');try{target.applyChangeset(session.changeset(),{filter(){thrownewError('filter failed');},});}catch(error){console.log('applyChangeset:',error.message);}try{constresult=target.exec('invalid SQL');console.log('invalid SQL:',result);}catch(error){console.log('invalid SQL threw:',error.message);}How often does it reproduce? Is there a required condition?
Always
What is the expected behavior? Why is that the expected behavior?
applyChangeset: filter failedinvalid SQL threw: near "invalid": syntax error
The callback-failure state is cleared when applyChangeset() returns, so the invalid SQL throws an SQLite syntax error.
What do you see instead?
applyChangeset: filter failedinvalid SQL: undefined
After catching the filter exception, unrelated invalid SQL silently returns undefined
Additional information
No response
Version
main
Platform
Subsystem
sqlite
What steps will reproduce the bug?
How often does it reproduce? Is there a required condition?
Always
What is the expected behavior? Why is that the expected behavior?
The callback-failure state is cleared when
applyChangeset()returns, so the invalid SQL throws an SQLite syntax error.What do you see instead?
After catching the filter exception, unrelated invalid SQL silently returns
undefinedAdditional information
No response