Mercurial > hg > orthanc
diff PalantirServer/PalantirInitialization.cpp @ 19:e85455ff6039
standalon
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 24 Jul 2012 10:17:12 +0200 |
parents | 3959d33612cc |
children | 62bd05fe4b7c |
line wrap: on
line diff
--- a/PalantirServer/PalantirInitialization.cpp Tue Jul 24 10:03:17 2012 +0200 +++ b/PalantirServer/PalantirInitialization.cpp Tue Jul 24 10:17:12 2012 +0200 @@ -48,14 +48,22 @@ } else { -#if PALANTIR_RELEASE == 0 - boost::filesystem::path p = PALANTIR_PATH; - p /= "Resources"; - p /= CONFIGURATION_FILE; - Toolbox::ReadFile(content, p.string()); + try + { +#if PALANTIR_STANDALONE == 0 + boost::filesystem::path p = PALANTIR_PATH; + p /= "Resources"; + p /= CONFIGURATION_FILE; + Toolbox::ReadFile(content, p.string()); #else - Toolbox::ReadFile(content, CONFIGURATION_FILE); + Toolbox::ReadFile(content, CONFIGURATION_FILE); #endif + } + catch (PalantirException&) + { + // No configuration file found, give up with empty configuration + return; + } } Json::Reader reader;