Skip to content
Snippets Groups Projects
Commit 2cf5ea3b authored by Daniel Joseph Antrim's avatar Daniel Joseph Antrim
Browse files

check if hw configs exist

parent 72ce2364
No related branches found
No related tags found
No related merge requests found
......@@ -40,6 +40,9 @@ void DataSinkConf::setHardwareConfig(const std::string& hardwareConfigFile)
{
//load JSON object from file
std::ifstream i(hardwareConfigFile);
if(!i.good()) {
throw std::runtime_error("Provided datasink configuration file \"" + hardwareConfigFile + "\" could not be found or opened");
}
i >> m_hardwareConfig;
}
......
......@@ -38,6 +38,9 @@ void EquipConf::setHardwareConfig(const std::string& hardwareConfigFile)
{
//load JSON object from file
std::ifstream i(hardwareConfigFile);
if(!i.good()) {
throw std::runtime_error("Provided equipment configuration file \"" + hardwareConfigFile + "\" could not be found or opened");
}
i >> m_hardwareConfig;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment