Enhance exception throwing with Boost Exception library
Change-Id: I471023fc23ffaebe04d9668426b4c1b03e4962ba
Refs: #2997
diff --git a/src/util/regex/regex-backref-matcher.hpp b/src/util/regex/regex-backref-matcher.hpp
index 1174541..77efd83 100644
--- a/src/util/regex/regex-backref-matcher.hpp
+++ b/src/util/regex/regex-backref-matcher.hpp
@@ -69,7 +69,7 @@
RegexBackrefMatcher::compile()
{
if (m_expr.size() < 2)
- throw RegexMatcher::Error("Unrecognized format: " + m_expr);
+ BOOST_THROW_EXCEPTION(RegexMatcher::Error("Unrecognized format: " + m_expr));
size_t lastIndex = m_expr.size() - 1;
if ('(' == m_expr[0] && ')' == m_expr[lastIndex]) {
@@ -80,7 +80,7 @@
m_matchers.push_back(matcher);
}
else
- throw RegexMatcher::Error("Unrecognized format: " + m_expr);
+ BOOST_THROW_EXCEPTION(RegexMatcher::Error("Unrecognized format: " + m_expr));
}