mirror of https://gitee.com/bigwinds/arangodb
If arangod doesn't successfully initialise ICU on startup it will now abort.
This commit is contained in:
parent
818d393999
commit
b4ba07f765
|
@ -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
|
||||
// .............................................................................
|
||||
|
|
Loading…
Reference in New Issue