commit bfa25cae37a69a469240060d79b017f55f6625b7 parent e8ed4281f95c59282b7532bc83e14e0de516b2e4 Author: Dan Stillman <dstillman@zotero.org> Date: Fri, 16 Jun 2006 22:15:07 +0000 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) Diffstat:
| M | chrome/chromeFiles/content/scholar/xpcom/db.js | | | 14 | ++++++++++++-- |
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/chrome/chromeFiles/content/scholar/xpcom/db.js b/chrome/chromeFiles/content/scholar/xpcom/db.js @@ -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 + ']'); + } } }