Encourage reporting of startup errors in the forums

We're now flagging the DB for repair on startup errors, so if that fixes
the problem (e.g., because of our undiagnosed skipped-schema-update-step
problem), we'd still like to know about it.
This commit is contained in:
Dan Stillman 2021-01-17 03:38:30 -05:00
parent 9152012368
commit 2adf0e6d3c
4 changed files with 13 additions and 5 deletions

View file

@ -1287,7 +1287,7 @@ Zotero.DBConnection.prototype._handleCorruptionMarker = async function () {
Zotero.alert(
null,
Zotero.getString('startupError'),
Zotero.getString('startupError', Zotero.appName),
Zotero.getString(
'db.dbCorruptedNoBackup',
[Zotero.appName, fileName, OS.Path.basename(damagedFile)]

View file

@ -2214,7 +2214,11 @@ Zotero.Schema = new function(){
Components.utils.reportError(e);
let ps = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
.getService(Components.interfaces.nsIPromptService);
ps.alert(null, Zotero.getString('general.error'), Zotero.getString('startupError'));
ps.alert(
null,
Zotero.getString('general.error'),
Zotero.getString('startupError', Zotero.appName)
);
throw e;
});
}

View file

@ -751,7 +751,9 @@ Services.scriptloader.loadSubScript("resource://zotero/polyfill.js");
catch (e) {
Zotero.logError(e);
if (!Zotero.startupError) {
Zotero.startupError = Zotero.getString('startupError') + "\n\n" + (e.stack || e);
Zotero.startupError = Zotero.getString('startupError', Zotero.appName) + "\n\n"
+ Zotero.getString('db.integrityCheck.reportInForums') + "\n\n"
+ (e.stack || e);
}
return false;
}
@ -807,7 +809,9 @@ Services.scriptloader.loadSubScript("resource://zotero/polyfill.js");
}
else {
let stack = e.stack ? Zotero.Utilities.Internal.filterStack(e.stack) : null;
Zotero.startupError = Zotero.getString('startupError') + "\n\n" + (stack || e);
Zotero.startupError = Zotero.getString('startupError', Zotero.appName) + "\n\n"
+ Zotero.getString('db.integrityCheck.reportInForums') + "\n\n"
+ (stack || e);
}
Zotero.debug(e.toString(), 1);

View file

@ -187,7 +187,7 @@ dataDir.migration.failure.full.showCurrentDirectoryAndQuit = Show Current Direct
app.standalone = Zotero Standalone
app.firefox = Zotero for Firefox
startupError = There was an error starting Zotero.
startupError = There was an error starting %S.
startupError.databaseInUse = Your Zotero database is currently in use. Only one instance of Zotero using the same database may be opened simultaneously at this time.
startupError.closeStandalone = If Zotero Standalone is open, please close it and restart Firefox.
startupError.closeFirefox = If Firefox with the Zotero extension is open, please close it and restart Zotero Standalone.