Enhance exception throwing with Boost Exception library
Change-Id: I471023fc23ffaebe04d9668426b4c1b03e4962ba
Refs: #2997
diff --git a/src/meta-info.cpp b/src/meta-info.cpp
index a1bfa18..1fb2d9f 100644
--- a/src/meta-info.cpp
+++ b/src/meta-info.cpp
@@ -78,7 +78,8 @@
{
for (std::list<Block>::const_iterator i = info.begin(); i != info.end(); ++i) {
if (!(128 <= i->type() && i->type() <= 252))
- throw Error("AppMetaInfo block has type outside the application range [128, 252]");
+ BOOST_THROW_EXCEPTION(Error("AppMetaInfo block has type outside the application range "
+ "[128, 252]"));
}
m_wire.reset();
@@ -90,7 +91,8 @@
MetaInfo::addAppMetaInfo(const Block& block)
{
if (!(128 <= block.type() && block.type() <= 252))
- throw Error("AppMetaInfo block has type outside the application range [128, 252]");
+ BOOST_THROW_EXCEPTION(Error("AppMetaInfo block has type outside the application range "
+ "[128, 252]"));
m_wire.reset();
m_appMetaInfo.push_back(block);