From 48fc3fd7429d977c38dbbc95cad4ba96f43e349d Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Fri, 3 Jul 2009 03:19:28 +0000 Subject: [PATCH] Better debug and error messages for "not an error" messages (most of which should now be fixed via server) --- chrome/content/zotero/xpcom/data/collection.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/chrome/content/zotero/xpcom/data/collection.js b/chrome/content/zotero/xpcom/data/collection.js index 14ed29d798..c80ae2b0ca 100644 --- a/chrome/content/zotero/xpcom/data/collection.js +++ b/chrome/content/zotero/xpcom/data/collection.js @@ -551,13 +551,13 @@ Zotero.Collection.prototype.save = function () { insertStatement.execute(); } catch (e) { - Zotero.debug('======='); - Zotero.debug(collectionID); - Zotero.debug(itemID); - Zotero.debug(orderIndex); - Zotero.debug(Zotero.DB.query("SELECT * FROM collections")); - Zotero.debug(Zotero.DB.query("SELECT * FROM collectionItems")); - throw (e + ' [ERROR: ' + Zotero.DB.getLastErrorString() + ']'); + Zotero.debug("collectionID: " + collectionID); + Zotero.debug("itemID: " + itemID); + Zotero.debug("orderIndex: " + orderIndex); + var errmsg = Zotero.DB.getLastErrorString(); + Zotero.debug(Zotero.DB.query("SELECT * FROM collections WHERE collectionID=?", collectionID)); + Zotero.debug(Zotero.DB.query("SELECT * FROM collectionItems WHERE collectionID=?", collectionID)); + throw (e + ' [ERROR: ' + errmsg + ']'); } } }