Add DB version info to newer-DB-version error
This commit is contained in:
parent
aab21f68ad
commit
e1c1803ce2
|
@ -1899,7 +1899,8 @@ Zotero.Schema = new function(){
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else if (fromVersion > toVersion) {
|
else if (fromVersion > toVersion) {
|
||||||
throw("Zotero user data DB version is newer than SQL file");
|
throw new Error("Zotero user data DB version is newer than SQL file "
|
||||||
|
+ "(" + toVersion + " < " + fromVersion + ")");
|
||||||
}
|
}
|
||||||
|
|
||||||
Zotero.debug('Updating user data tables from version ' + fromVersion + ' to ' + toVersion);
|
Zotero.debug('Updating user data tables from version ' + fromVersion + ' to ' + toVersion);
|
||||||
|
|
|
@ -608,13 +608,13 @@ Components.utils.import("resource://gre/modules/Services.jsm");
|
||||||
var updated = Zotero.Schema.updateSchema();
|
var updated = Zotero.Schema.updateSchema();
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
if (typeof e == 'string' && e.match('newer than SQL file')) {
|
if (e.toString().match('newer than SQL file')) {
|
||||||
var kbURL = "http://zotero.org/support/kb/newer_db_version";
|
let versions = e.toString().match(/\((\d+) < \d+\)/);
|
||||||
var msg = Zotero.localeJoin([
|
let kbURL = "https://www.zotero.org/support/kb/newer_db_version";
|
||||||
Zotero.getString('startupError.zoteroVersionIsOlder'),
|
let msg = Zotero.getString('startupError.zoteroVersionIsOlder') + " "
|
||||||
Zotero.getString('startupError.zoteroVersionIsOlder.upgrade')
|
+ Zotero.getString('startupError.zoteroVersionIsOlder.upgrade') + "\n\n"
|
||||||
]) + "\n\n"
|
+ Zotero.getString('startupError.zoteroVersionIsOlder.current', Zotero.version) + "\n"
|
||||||
+ Zotero.getString('startupError.zoteroVersionIsOlder.current', Zotero.version) + "\n\n"
|
+ (versions ? "DB: " + versions[1] + "\n\n" : "\n")
|
||||||
+ Zotero.getString('general.seeForMoreInformation', kbURL);
|
+ Zotero.getString('general.seeForMoreInformation', kbURL);
|
||||||
Zotero.startupError = msg;
|
Zotero.startupError = msg;
|
||||||
_startupErrorHandler = function() {
|
_startupErrorHandler = function() {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user