www

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

commit 37e4d8962ebda79c86273f0873d4f07a62499824
parent 0d1314770467c4d0e8a390de53c3524264a69ced
Author: Dan Stillman <dstillman@zotero.org>
Date:   Wed, 16 Dec 2009 00:06:01 +0000

Better debug output for a few ZFS errors


Diffstat:
Mchrome/content/zotero/xpcom/storage/zfs.js | 17+++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/chrome/content/zotero/xpcom/storage/zfs.js b/chrome/content/zotero/xpcom/storage/zfs.js @@ -93,8 +93,10 @@ Zotero.Sync.Storage.Session.ZFS.prototype._getStorageFileInfo = function (item, return; } else if (req.status != 200) { + var msg = "Unexpected status code " + req.status + " in " + funcName; + Zotero.debug(msg + " (" + Zotero.Items.getLibraryKeyHash(item) + ")", 1); Zotero.debug(req.responseText); - self.onError("Unexpected status code " + req.status + " in " + funcName); + self.onError(msg); return; } @@ -485,8 +487,10 @@ Zotero.Sync.Storage.Session.ZFS.prototype._getFileUploadParameters = function (i return; } else if (req.status != 200) { + var msg = "Unexpected status code " + req.status + " in " + funcName; + Zotero.debug(msg + " (" + Zotero.Items.getLibraryKeyHash(item) + ")", 1); Zotero.debug(req.responseText); - self.onError("Unexpected status code " + req.status + " in " + funcName); + self.onError(msg); return; } @@ -668,11 +672,12 @@ Zotero.Sync.Storage.Session.ZFS.prototype._onUploadComplete = function (httpRequ // Register upload on server Zotero.Utilities.HTTP.doPost(uri, body, function (req) { - Zotero.debug(req.responseText); - if (req.status != 204) { - self.onError("Unexpected file registration status " + status - + " in Zotero.Sync.Storage._onUploadComplete()"); + var msg = "Unexpected file registration status " + status + + " in Zotero.Sync.Storage._onUploadComplete()"; + Zotero.debug(msg + " (" + Zotero.Items.getLibraryKeyHash(item) + ")", 1); + Zotero.debug(req.responseText); + self.onError(msg); return; }