Enhance exception throwing with Boost Exception library
Change-Id: I471023fc23ffaebe04d9668426b4c1b03e4919aa
Refs: #2541
diff --git a/core/logger-factory.cpp b/core/logger-factory.cpp
index 20578c3..a463b94 100644
--- a/core/logger-factory.cpp
+++ b/core/logger-factory.cpp
@@ -87,7 +87,7 @@
catch (const boost::bad_lexical_cast& error) {
}
- throw LoggerFactory::Error("Unsupported logging level \"" + level + "\"");
+ BOOST_THROW_EXCEPTION(LoggerFactory::Error("Unsupported logging level \"" + level + "\""));
}
LogLevel
@@ -101,7 +101,7 @@
}
if (levelString.empty()) {
- throw LoggerFactory::Error("No logging level found for option \"" + key + "\"");
+ BOOST_THROW_EXCEPTION(LoggerFactory::Error("No logging level found for option \"" + key + "\""));
}
return parseLevel(levelString);