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:
@ -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{
|
||||
|
Reference in New Issue
Block a user