www

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

commit 45c4d1512821c4dfbd540d91cc34c4b94dfddd5f
parent a85a52dec089652d0081b6ebd3125d2024227151
Author: Dan Stillman <dstillman@zotero.org>
Date:   Mon,  7 Feb 2011 07:33:20 +0000

Catch "script stack space quota is exhausted" sync error and display an upgrade message


Diffstat:
Mchrome/content/zotero/xpcom/sync.js | 14+++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/chrome/content/zotero/xpcom/sync.js b/chrome/content/zotero/xpcom/sync.js @@ -1350,12 +1350,12 @@ Zotero.Sync.Server = new function () { _error(response.firstChild.firstChild.nodeValue); } - var xml = xmlhttp.responseText.replace(/^\s*<\?xml.*\?>\s*/, '').trim(); - - // Strip XML declaration and convert to E4X - xml = new XML(xml); - try { + var xml = xmlhttp.responseText.replace(/^\s*<\?xml.*\?>\s*/, '').trim(); + + // Strip XML declaration and convert to E4X + xml = new XML(xml); + var updateKey = xml.@updateKey.toString(); // If no earliest date is provided by the server, the server @@ -2219,6 +2219,10 @@ Zotero.Sync.Server = new function () { } } + if (e.message == 'script stack space quota is exhausted') { + var e = "Firefox 4.0 or higher is required to process sync operations of this size."; + } + if (extraInfo) { // Server errors will generally be HTML extraInfo = Zotero.Utilities.unescapeHTML(extraInfo);