www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 7e3ba7bc617f05f35cd8a4c5b2fcf9a637017677
parent 1e6c29766fbf4dc2258f05c3b14bdf3b0b9b1d94
Author: Dan Stillman <dstillman@zotero.org>
Date:   Sun,  1 Nov 2015 03:45:46 -0500

Misc. debug tweaks

Diffstat:
Mchrome/content/zotero/xpcom/data/item.js | 9+++++----
Mtest/tests/storageEngineTest.js | 3---
2 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/chrome/content/zotero/xpcom/data/item.js b/chrome/content/zotero/xpcom/data/item.js @@ -2175,8 +2175,8 @@ Zotero.Item.prototype._updateAttachmentStates = function (exists) { // standalone attachment was modified locally and remotely was changed // into a child attachment catch (e) { - Zotero.logError("Attachment parent doesn't exist for source key " - + "in Zotero.Item.updateAttachmentStates()"); + Zotero.logError(`Attachment parent ${this.libraryID}/${parentKey} doesn't exist for ` + + "source key in Zotero.Item.updateAttachmentStates()"); return; } @@ -2185,13 +2185,14 @@ Zotero.Item.prototype._updateAttachmentStates = function (exists) { } catch (e) { if (e instanceof Zotero.Exception.UnloadedDataException) { - Zotero.logError("Attachment parent not yet loaded in Zotero.Item.updateAttachmentStates()"); + Zotero.logError(`Attachment parent ${this.libraryID}/${parentKey} not yet loaded in ` + + "Zotero.Item.updateAttachmentStates()"); return; } throw e; } if (!item) { - Zotero.logError("Attachment parent doesn't exist"); + Zotero.logError(`Attachment parent ${this.libraryID}/${parentKey} doesn't exist`); return; } item.clearBestAttachmentState(); diff --git a/test/tests/storageEngineTest.js b/test/tests/storageEngineTest.js @@ -62,12 +62,10 @@ describe("Zotero.Sync.Storage.Engine", function () { before(function* () { }) beforeEach(function* () { - Zotero.debug("BEFORE HERE"); yield resetDB({ thisArg: this, skipBundledFiles: true }); - Zotero.debug("DONE RESET"); win = yield loadZoteroPane(); Zotero.HTTP.mock = sinon.FakeXMLHttpRequest; @@ -82,7 +80,6 @@ describe("Zotero.Sync.Storage.Engine", function () { Zotero.Sync.Storage.Local.downloadOnSync( Zotero.Libraries.userLibraryID, true ); - Zotero.debug("DONE BEFORE"); }) afterEach(function* () { var defer = new Zotero.Promise.defer();