1
0
Fork 0

If arangod doesn't successfully initialise ICU on startup it will now abort.

This commit is contained in:
Willi Goesgens 2015-01-28 17:32:59 +01:00
parent 818d393999
commit b4ba07f765
1 changed files with 17 additions and 16 deletions

View File

@ -457,12 +457,28 @@ void ArangoServer::buildApplicationServer () {
("check-version", "checks the versions of the database and exit")
;
// other options
// .............................................................................
// set language of default collator
// .............................................................................
additional[ApplicationServer::OPTIONS_SERVER]
("temp-path", &_tempPath, "temporary path")
("default-language", &_defaultLanguage, "ISO-639 language code")
;
string languageName;
if (!Utf8Helper::DefaultUtf8Helper.setCollatorLanguage(_defaultLanguage)) {
LOG_FATAL_AND_EXIT("failed to initialise ICU");
}
if (Utf8Helper::DefaultUtf8Helper.getCollatorCountry() != "") {
languageName = string(Utf8Helper::DefaultUtf8Helper.getCollatorLanguage() + "_" + Utf8Helper::DefaultUtf8Helper.getCollatorCountry());
}
else {
languageName = Utf8Helper::DefaultUtf8Helper.getCollatorLanguage();
}
// other options
additional[ApplicationServer::OPTIONS_HIDDEN]
("no-upgrade", "skip a database upgrade")
("start-service", "used to start as windows service")
@ -608,21 +624,6 @@ void ArangoServer::buildApplicationServer () {
_applicationV8->enableDevelopmentMode();
}
// .............................................................................
// set language of default collator
// .............................................................................
string languageName;
Utf8Helper::DefaultUtf8Helper.setCollatorLanguage(_defaultLanguage);
if (Utf8Helper::DefaultUtf8Helper.getCollatorCountry() != "") {
languageName = string(Utf8Helper::DefaultUtf8Helper.getCollatorLanguage() + "_" + Utf8Helper::DefaultUtf8Helper.getCollatorCountry());
}
else {
languageName = Utf8Helper::DefaultUtf8Helper.getCollatorLanguage();
}
// .............................................................................
// init nonces
// .............................................................................