www

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

commit 1d45f3d00826b21651cf9a18d5137a687a28f752
parent 5866a763122c72ee1c5121d9422b58bbd8bc414b
Author: Dan Stillman <dstillman@zotero.org>
Date:   Tue,  6 Dec 2016 06:12:54 -0500

Show more startup errors in Standalone, with stack

Diffstat:
Mcomponents/zotero-service.js | 11+++++++----
1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/components/zotero-service.js b/components/zotero-service.js @@ -348,13 +348,14 @@ function ZoteroService() { return zContext.Zotero.init(zInitOptions); }) } - dump(e + "\n\n"); Components.utils.reportError(e); if (!zContext.Zotero.startupError) { - zContext.Zotero.startupError = e; + zContext.Zotero.startupError = e.stack || e + "\n\n" + e.stack; + } + if (!isStandalone()) { + throw e; } - throw e; }) .then(function () { if (isStandalone()) { @@ -363,7 +364,9 @@ function ZoteroService() { zContext.Zotero.startupErrorHandler(); } else if (zContext.Zotero.startupError) { - zContext.alert(zContext.Zotero.startupError); + Cc["@mozilla.org/embedcomp/prompt-service;1"] + .getService(Ci.nsIPromptService) + .alert(null, "Error", zContext.Zotero.startupError); } zContext.Zotero.Utilities.Internal.quitZotero(); }