commit bf416e56c2d49896739b4ddbf235abff294d4b87
parent 3dabd63a0aeb5e9ffb138c6e1d11d37a2c87f1f3
Author: Dan Stillman <dstillman@zotero.org>
Date: Wed, 20 Apr 2016 02:32:12 -0400
Tweak sync error logging
Diffstat:
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/chrome/content/zotero/xpcom/sync/syncEngine.js b/chrome/content/zotero/xpcom/sync/syncEngine.js
@@ -906,10 +906,11 @@ Zotero.Sync.Data.Engine.prototype._uploadObjects = Zotero.Promise.coroutine(func
// Handle failed objects
for (let index in json.results.failed) {
let { code, message } = json.results.failed[index];
- e = new Error(message);
+ let e = new Error(message);
e.name = "ZoteroUploadObjectError";
e.code = code;
- Zotero.logError(e);
+ Zotero.logError("Error for " + objectType + " " + batch[index].key + " in "
+ + this.library.name + ":\n\n" + e);
// This shouldn't happen, because the upload request includes a library
// version and should prevent an outdated upload before the object version is
diff --git a/chrome/content/zotero/xpcom/sync/syncRunner.js b/chrome/content/zotero/xpcom/sync/syncRunner.js
@@ -1088,7 +1088,7 @@ Zotero.Sync.Runner_Module = function (options = {}) {
// For unexpected ones, just show a generic message
else {
// TODO: improve and localize
- var msg = "An error occurred during syncing:\n\n" + e;
+ var msg = "An error occurred during syncing:\n\n" + e.message;
}
var desc = doc.createElement('description');