Skip to content

Commit

Permalink
show file path when problems with client config loading
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergei Semin committed Feb 2, 2019
1 parent 6ed2a4d commit 425a12d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion dbms/src/Common/Config/configReadClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include <Poco/Util/Application.h>
#include <Poco/Util/LayeredConfiguration.h>
#include <Poco/File.h>
#include <iostream>
#include "ConfigProcessor.h"

namespace DB
Expand All @@ -22,7 +23,13 @@ bool configReadClient(Poco::Util::LayeredConfiguration & config, const std::stri
if (!config_path.empty())
{
ConfigProcessor config_processor(config_path);
auto loaded_config = config_processor.loadConfig();
ConfigProcessor::LoadedConfig loaded_config;
try {
loaded_config = config_processor.loadConfig();
} catch (const Poco::Exception& ex) {
std::cerr << "problem with file: " << config_path << std::endl;
ex.rethrow();
}
config.add(loaded_config.configuration);
return true;
}
Expand Down

0 comments on commit 425a12d

Please sign in to comment.