Enhance exception throwing with Boost Exception library

Change-Id: I471023fc23ffaebe04d9668426b4c1b03e4962ba
Refs: #2997
diff --git a/src/util/config-file.cpp b/src/util/config-file.cpp
index a68939d..ebf2a7a 100644
--- a/src/util/config-file.cpp
+++ b/src/util/config-file.cpp
@@ -123,11 +123,11 @@
 {
   if (m_path.empty())
     {
-      throw Error("Failed to locate configuration file for parsing");
+      BOOST_THROW_EXCEPTION(Error("Failed to locate configuration file for parsing"));
     }
   else if (!m_input.is_open() && !open())
     {
-      throw Error("Failed to open configuration file for parsing");
+      BOOST_THROW_EXCEPTION(Error("Failed to open configuration file for parsing"));
     }
 
   try
@@ -140,7 +140,7 @@
       msg << "Failed to parse configuration file";
       msg << " " << m_path;
       msg << " " << error.message() << " line " << error.line();
-      throw Error(msg.str());
+      BOOST_THROW_EXCEPTION(Error(msg.str()));
     }
   return m_config;
 }