www

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

commit 84882c8ecf8b3be28d55c328d62d4a15db97f886
parent b7cba469f08cf60c185a34a9da435a815cbee3d0
Author: Dan Stillman <dstillman@zotero.org>
Date:   Wed, 27 Nov 2013 16:08:31 -0500

Include actual error in "There was an error starting Zotero." dialog

And use a proper title

Diffstat:
Mchrome/content/zotero/xpcom/zotero.js | 2++
Mchrome/content/zotero/zoteroPane.js | 21+++++++++++----------
2 files changed, 13 insertions(+), 10 deletions(-)

diff --git a/chrome/content/zotero/xpcom/zotero.js b/chrome/content/zotero/xpcom/zotero.js @@ -831,6 +831,8 @@ Components.utils.import("resource://gre/modules/osfile.jsm"); Zotero.getString(Zotero.isStandalone ? 'startupError.closeFirefox' : 'startupError.closeStandalone') ]); Zotero.startupError = msg; + } else { + Zotero.startupError = Zotero.getString('startupError') + "\n\n" + e; } Zotero.debug(e.toString(), 1); diff --git a/chrome/content/zotero/zoteroPane.js b/chrome/content/zotero/zoteroPane.js @@ -3997,16 +3997,17 @@ var ZoteroPane = new function() var errFunc = Zotero.startupErrorHandler; } + // Get the stringbundle manually + var src = 'chrome://zotero/locale/zotero.properties'; + var localeService = Components.classes['@mozilla.org/intl/nslocaleservice;1']. + getService(Components.interfaces.nsILocaleService); + var appLocale = localeService.getApplicationLocale(); + var stringBundleService = Components.classes["@mozilla.org/intl/stringbundle;1"] + .getService(Components.interfaces.nsIStringBundleService); + var stringBundle = stringBundleService.createBundle(src, appLocale); + + var title = stringBundle.GetStringFromName('general.error'); if (!errMsg) { - // Get the stringbundle manually - var src = 'chrome://zotero/locale/zotero.properties'; - var localeService = Components.classes['@mozilla.org/intl/nslocaleservice;1']. - getService(Components.interfaces.nsILocaleService); - var appLocale = localeService.getApplicationLocale(); - var stringBundleService = Components.classes["@mozilla.org/intl/stringbundle;1"] - .getService(Components.interfaces.nsIStringBundleService); - var stringBundle = stringBundleService.createBundle(src, appLocale); - var errMsg = stringBundle.GetStringFromName('startupError'); } @@ -4022,7 +4023,7 @@ var ZoteroPane = new function() //} else { var ps = Components.classes["@mozilla.org/embedcomp/prompt-service;1"] .getService(Components.interfaces.nsIPromptService); - ps.alert(null, "", errMsg); + ps.alert(null, title, errMsg); //} } }