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:
parent
e8ed4281f9
commit
bfa25cae37
1 changed files with 12 additions and 2 deletions
|
@ -215,7 +215,12 @@ Scholar.DB = new function(){
|
|||
}
|
||||
else {
|
||||
Scholar.debug('Committing transaction',5);
|
||||
db.commitTransaction();
|
||||
try {
|
||||
db.commitTransaction();
|
||||
}
|
||||
catch(e){
|
||||
throw(e + ' [ERROR: ' + db.lastErrorString + ']');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -230,7 +235,12 @@ Scholar.DB = new function(){
|
|||
else {
|
||||
Scholar.debug('Rolling back transaction', 5);
|
||||
_transactionRollback = false;
|
||||
db.rollbackTransaction();
|
||||
try {
|
||||
db.rollbackTransaction();
|
||||
}
|
||||
catch(e){
|
||||
throw(e + ' [ERROR: ' + db.lastErrorString + ']');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue