Include actual error in "There was an error starting Zotero." dialog
And use a proper title
This commit is contained in:
parent
b7cba469f0
commit
84882c8ecf
2 changed files with 13 additions and 10 deletions
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue