mirror of
https://github.com/boostorg/regex.git
synced 2025-07-19 07:12:07 +02:00
Add tests for https://github.com/boostorg/regex/issues/153
Make runtime errors, regex_error's.
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user