aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2016-07-06 18:19:40 +0200
committerRiccardo Spagni <ric@spagni.net>2016-07-06 18:19:40 +0200
commit1088ed862b9c6b7236522e6ac2910434c961c1fc (patch)
tree0776af63aa9c7d0ccb31854cfa06463777ca00f4 /src
parentMerge pull request #882 (diff)
parentdaemon: print exception errors when failing to parse config file (diff)
downloadmonero-1088ed862b9c6b7236522e6ac2910434c961c1fc.tar.xz
Merge pull request #883
459ec60 daemon: print exception errors when failing to parse config file (moneromooo-monero)
Diffstat (limited to 'src')
-rw-r--r--src/daemon/main.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/daemon/main.cpp b/src/daemon/main.cpp
index 2e2f8936c..638fae20e 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<char>(config_path.string<std::string>().c_str(), core_settings), vm);
+ try
+ {
+ 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);