Enhance exception throwing with Boost Exception library
Change-Id: I471023fc23ffaebe04d9668426b4c1b03e4962ba
Refs: #2997
diff --git a/src/util/regex/regex-pattern-list-matcher.hpp b/src/util/regex/regex-pattern-list-matcher.hpp
index acca0f9..fedcbaa 100644
--- a/src/util/regex/regex-pattern-list-matcher.hpp
+++ b/src/util/regex/regex-pattern-list-matcher.hpp
@@ -86,7 +86,7 @@
subHead = index;
if (!extractPattern(subHead, &index))
- throw RegexMatcher::Error("Compile error");
+ BOOST_THROW_EXCEPTION(RegexMatcher::Error("Compile error"));
}
}
@@ -135,7 +135,7 @@
break;
default:
- throw RegexMatcher::Error("Unexpected syntax");
+ BOOST_THROW_EXCEPTION(RegexMatcher::Error("Unexpected syntax"));
}
*next = end;
@@ -152,7 +152,7 @@
while (lcount > rcount) {
if (index >= m_expr.size())
- throw RegexMatcher::Error("Parenthesis mismatch");
+ BOOST_THROW_EXCEPTION(RegexMatcher::Error("Parenthesis mismatch"));
if (left == m_expr[index])
lcount++;
@@ -184,7 +184,7 @@
break;
}
if (index == exprSize)
- throw RegexMatcher::Error("Missing right brace bracket");
+ BOOST_THROW_EXCEPTION(RegexMatcher::Error("Missing right brace bracket"));
else
return ++index;
}