diff --git a/src/daemon/main.cpp b/src/daemon/main.cpp index 2e2f8936..638fae20 100644 --- a/src/daemon/main.cpp +++ b/src/daemon/main.cpp @@ -180,7 +180,16 @@ int main(int argc, char const * argv[]) boost::system::error_code ec; if (bf::exists(config_path, ec)) { - po::store(po::parse_config_file(config_path.string().c_str(), core_settings), vm); + try + { + po::store(po::parse_config_file(config_path.string().c_str(), core_settings), vm); + } + catch (const std::exception &e) + { + // log system isn't initialized yet + std::cerr << "Error parsing config file: " << e.what() << std::endl; + throw; + } } po::notify(vm);