Misc. debug tweaks

This commit is contained in:
Dan Stillman 2015-11-01 03:45:46 -05:00
parent 1e6c29766f
commit 7e3ba7bc61
2 changed files with 5 additions and 7 deletions

View file

@ -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();

View file

@ -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();