1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-29 08:01:23 +03:00

Improve an exception check in demo-oo1.js.

FossilOrigin-Name: 55e1b775fa7ec492817cc847036df7794c3c22b78558e9e9c513f24c775dedab
This commit is contained in:
stephan
2022-08-18 11:16:27 +00:00
parent 453af2f6cc
commit fed91737f5
3 changed files with 15 additions and 11 deletions

View File

@ -170,8 +170,12 @@
throw new sqlite3.SQLite3Error("Demonstrating callInTransaction() rollback");
});
}catch(e){
log("Got expected exception:",e.message);
log("count(*) from t =",db.selectValue("select count(*) from t"));
if(e instanceof sqlite3.SQLite3Error){
log("Got expected exception:",e.message);
log("count(*) from t =",db.selectValue("select count(*) from t"));
}else{
throw e;
}
}
}finally{