Better debug and error messages for "not an error" messages (most of which should now be fixed via server)

This commit is contained in:
Dan Stillman 2009-07-03 03:19:28 +00:00
parent e3e14a3f92
commit 48fc3fd742

View file

@ -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 + ']');
}
}
}