Enhance exception throwing with Boost Exception library
Change-Id: I471023fc23ffaebe04d9668426b4c1b03e4962ba
Refs: #2997
diff --git a/src/util/regex/regex-repeat-matcher.hpp b/src/util/regex/regex-repeat-matcher.hpp
index 3d6e4f5..530721e 100644
--- a/src/util/regex/regex-repeat-matcher.hpp
+++ b/src/util/regex/regex-repeat-matcher.hpp
@@ -162,12 +162,12 @@
max = min;
}
else
- throw RegexMatcher::Error(std::string("Error: RegexRepeatMatcher.ParseRepetition(): ")
- + "Unrecognized format "+ m_expr);
+ BOOST_THROW_EXCEPTION(RegexMatcher::Error(std::string("Error: RegexRepeatMatcher.ParseRepetition():")
+ + " Unrecognized format "+ m_expr));
if (min > MAX_REPETITIONS || max > MAX_REPETITIONS || min > max)
- throw RegexMatcher::Error(std::string("Error: RegexRepeatMatcher.ParseRepetition(): ")
- + "Wrong number " + m_expr);
+ BOOST_THROW_EXCEPTION(RegexMatcher::Error(std::string("Error: RegexRepeatMatcher.ParseRepetition():")
+ + " Wrong number " + m_expr));
m_repeatMin = min;
m_repeatMax = max;