Enhance exception throwing with Boost Exception library
Change-Id: I471023fc23ffaebe04d9668426b4c1b03e4919aa
Refs: #2541
diff --git a/core/config-file.cpp b/core/config-file.cpp
index a6861e3..9724168 100644
--- a/core/config-file.cpp
+++ b/core/config-file.cpp
@@ -40,7 +40,7 @@
msg += filename;
msg += ": no module subscribed for section \"" + sectionName + "\"";
- throw ConfigFile::Error(msg);
+ BOOST_THROW_EXCEPTION(ConfigFile::Error(msg));
}
void
@@ -73,7 +73,7 @@
{
std::string msg = "Failed to read configuration file: ";
msg += filename;
- throw Error(msg);
+ BOOST_THROW_EXCEPTION(Error(msg));
}
parse(inputFile, isDryRun, filename);
inputFile.close();
@@ -100,7 +100,7 @@
msg << "Failed to parse configuration file";
msg << " " << filename;
msg << " " << error.message() << " line " << error.line();
- throw Error(msg.str());
+ BOOST_THROW_EXCEPTION(Error(msg.str()));
}
process(isDryRun, filename);
@@ -124,7 +124,7 @@
std::string msg = "Error processing configuration file: ";
msg += filename;
msg += " no data";
- throw Error(msg);
+ BOOST_THROW_EXCEPTION(Error(msg));
}
for (ConfigSection::const_iterator i = m_global.begin(); i != m_global.end(); ++i)