From 7e3ba7bc617f05f35cd8a4c5b2fcf9a637017677 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Sun, 1 Nov 2015 03:45:46 -0500 Subject: [PATCH] Misc. debug tweaks --- chrome/content/zotero/xpcom/data/item.js | 9 +++++---- test/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 index f3d1b3a88b..b8cece905a 100644 --- 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 index 1efc1b4761..8df608c1a0 100644 --- 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();