Misc. debug output cleanup
This commit is contained in:
parent
63e169c139
commit
dcb7c88ebd
|
@ -87,7 +87,7 @@ Zotero.CachedTypes = function() {
|
|||
}
|
||||
|
||||
if (!this._types['_' + idOrName]) {
|
||||
Zotero.debug('Unknown ' + this._typeDesc + ' ' + idOrName, 1);
|
||||
Zotero.debug(`Unknown ${this._typeDesc} '${idOrName}'`, 1);
|
||||
return '';
|
||||
}
|
||||
|
||||
|
@ -108,7 +108,7 @@ Zotero.CachedTypes = function() {
|
|||
}
|
||||
|
||||
if (!this._types['_' + idOrName]) {
|
||||
Zotero.debug('Unknown ' + this._typeDesc + ' ' + idOrName, 1);
|
||||
Zotero.debug(`Unknown ${this._typeDesc} '${idOrName}'`, 1);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -4010,7 +4010,7 @@ Zotero.Item.prototype.fromJSON = function (json) {
|
|||
default:
|
||||
let fieldID = Zotero.ItemFields.getID(field);
|
||||
if (!fieldID) {
|
||||
Zotero.logError("Discarding unknown JSON field " + field + " for item "
|
||||
Zotero.logError("Discarding unknown JSON field '" + field + "' for item "
|
||||
+ this.libraryKey);
|
||||
continue;
|
||||
}
|
||||
|
@ -4019,7 +4019,7 @@ Zotero.Item.prototype.fromJSON = function (json) {
|
|||
this.itemTypeID
|
||||
);
|
||||
if (!isValidForType[field]) {
|
||||
Zotero.logError("Discarding invalid field " + field + " for type " + itemTypeID
|
||||
Zotero.logError("Discarding invalid field '" + field + "' for type " + itemTypeID
|
||||
+ " for item " + this.libraryKey);
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -437,7 +437,8 @@ Zotero.Sync.Data.Engine.prototype._downloadUpdatedObjects = Zotero.Promise.corou
|
|||
var objectTypePlural = Zotero.DataObjectUtilities.getObjectTypePlural(objectType);
|
||||
|
||||
// Get versions of all objects updated remotely since the current local library version
|
||||
Zotero.debug("Checking for updated " + objectTypePlural + " in " + this.library.name);
|
||||
Zotero.debug(`Checking for updated ${options.top ? 'top-level ' : ''}`
|
||||
+ `${objectTypePlural} in ${this.library.name}`);
|
||||
var queryParams = {};
|
||||
if (libraryVersion) {
|
||||
queryParams.since = libraryVersion;
|
||||
|
@ -1305,7 +1306,7 @@ Zotero.Sync.Data.Engine.prototype._processCache = function (objectType) {
|
|||
|
||||
Zotero.Sync.Data.Engine.prototype._failedCheck = function () {
|
||||
if (this.stopOnError && this.failed) {
|
||||
Zotero.debug("STOPPING ON ERROR 1");
|
||||
Zotero.logError("Stopping on error");
|
||||
throw this.failed;
|
||||
}
|
||||
};
|
||||
|
|
|
@ -453,8 +453,7 @@ Zotero.Sync.Data.Local = {
|
|||
let jsonData = json.data;
|
||||
let objectKey = json.key;
|
||||
|
||||
Zotero.debug(`Processing ${objectType} ${libraryID}/${objectKey} `
|
||||
+ "from sync cache");
|
||||
Zotero.debug(`Processing ${objectType} ${libraryID}/${objectKey}`);
|
||||
Zotero.debug(json);
|
||||
|
||||
if (!jsonData) {
|
||||
|
@ -555,7 +554,10 @@ Zotero.Sync.Data.Local = {
|
|||
if (objectType != 'item') {
|
||||
throw new Error(`Unexpected conflict on ${objectType} object`);
|
||||
}
|
||||
Zotero.debug("Conflict!");
|
||||
Zotero.debug("Conflict!", 2);
|
||||
Zotero.debug(jsonDataLocal);
|
||||
Zotero.debug(jsonData);
|
||||
Zotero.debug(result);
|
||||
conflicts.push({
|
||||
left: jsonDataLocal,
|
||||
right: jsonData,
|
||||
|
|
Loading…
Reference in New Issue
Block a user