Make runtime errors, regex_error's.
This commit is contained in:
jzmaddock
2021-10-12 19:23:18 +01:00
parent b5cb9b7a99
commit 1d17ca9d5d
3 changed files with 38 additions and 2 deletions

View File

@ -77,7 +77,8 @@ typedef regex_error bad_expression;
namespace BOOST_REGEX_DETAIL_NS{
inline void raise_runtime_error(const std::runtime_error& ex)
template <class E>
inline void raise_runtime_error(const E& ex)
{
#ifndef BOOST_REGEX_STANDALONE
::boost::throw_exception(ex);
@ -90,7 +91,7 @@ template <class traits>
void raise_error(const traits& t, regex_constants::error_type code)
{
(void)t; // warning suppression
std::runtime_error e(t.error_string(code));
regex_error e(t.error_string(code), code, 0);
::boost::BOOST_REGEX_DETAIL_NS::raise_runtime_error(e);
}