Make "[schema] version is newer than SQL file" message more visible

This commit is contained in:
Dan Stillman 2007-09-25 02:27:58 +00:00
parent 05ae491a36
commit 910518bb4a
2 changed files with 12 additions and 2 deletions

View File

@ -230,6 +230,7 @@ var ZoteroPane = new function()
// or load the default error page
if (makeVisible && (!Zotero || !Zotero.initialized)) {
if (Zotero) {
var errMsg = Zotero.startupError;
var errFunc = Zotero.startupErrorHandler;
}
@ -241,7 +242,7 @@ var ZoteroPane = new function()
// instructions
// window.loadURI('chrome://zotero/content/error.xul');
// TODO: localize if possible
alert("There was an error starting Zotero.");
alert(errMsg);
}
return;

View File

@ -221,7 +221,16 @@ var Zotero = new function(){
}
// If no userdata upgrade, still might need to process system/scrapers
else {
Zotero.Schema.updateSchema();
try {
Zotero.Schema.updateSchema();
}
catch (e) {
if (typeof e == 'string' && e.match('newer than SQL file')) {
_startupError = e;
}
Components.utils.reportError(_startupError);
return false;
}
}
Zotero.DB.startDummyStatement();