mirror of
https://github.com/monero-project/monero.git
synced 2024-10-01 11:49:47 -04:00
Merge pull request #883
459ec60
daemon: print exception errors when failing to parse config file (moneromooo-monero)
This commit is contained in:
commit
1088ed862b
@ -179,9 +179,18 @@ int main(int argc, char const * argv[])
|
|||||||
|
|
||||||
boost::system::error_code ec;
|
boost::system::error_code ec;
|
||||||
if (bf::exists(config_path, ec))
|
if (bf::exists(config_path, ec))
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
po::store(po::parse_config_file<char>(config_path.string<std::string>().c_str(), core_settings), vm);
|
po::store(po::parse_config_file<char>(config_path.string<std::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);
|
po::notify(vm);
|
||||||
|
|
||||||
// If there are positional options, we're running a daemon command
|
// If there are positional options, we're running a daemon command
|
||||||
|
Loading…
Reference in New Issue
Block a user