Display SQLite error in exceptions thrown from commitTransaction() and rollbackTransaction() (like the ones on field value updates that I'm trying to figure out at the moment)

This commit is contained in:
Dan Stillman 2006-06-16 22:15:07 +00:00
parent e8ed4281f9
commit bfa25cae37

View file

@ -215,8 +215,13 @@ Scholar.DB = new function(){
}
else {
Scholar.debug('Committing transaction',5);
try {
db.commitTransaction();
}
catch(e){
throw(e + ' [ERROR: ' + db.lastErrorString + ']');
}
}
}
@ -230,8 +235,13 @@ Scholar.DB = new function(){
else {
Scholar.debug('Rolling back transaction', 5);
_transactionRollback = false;
try {
db.rollbackTransaction();
}
catch(e){
throw(e + ' [ERROR: ' + db.lastErrorString + ']');
}
}
}