mirror of
https://github.com/boostorg/leaf.git
synced 2026-02-01 08:32:14 +00:00
Renamed augment_id to error_monitor
This commit is contained in:
@@ -1867,7 +1867,7 @@ namespace boost { namespace leaf {
|
||||
|
||||
namespace boost { namespace leaf {
|
||||
|
||||
class augment_id
|
||||
class error_monitor
|
||||
{
|
||||
#if !defined(BOOST_LEAF_NO_EXCEPTIONS) && BOOST_LEAF_STD_UNCAUGHT_EXCEPTIONS
|
||||
int const uncaught_exceptions_;
|
||||
@@ -1876,7 +1876,7 @@ namespace boost { namespace leaf {
|
||||
|
||||
public:
|
||||
|
||||
augment_id() noexcept:
|
||||
error_monitor() noexcept:
|
||||
#if !defined(BOOST_LEAF_NO_EXCEPTIONS) && BOOST_LEAF_STD_UNCAUGHT_EXCEPTIONS
|
||||
uncaught_exceptions_(std::uncaught_exceptions()),
|
||||
#endif
|
||||
@@ -1912,15 +1912,14 @@ namespace boost { namespace leaf {
|
||||
return leaf_detail::new_id();
|
||||
}
|
||||
|
||||
error_id check_error() const noexcept
|
||||
error_id check() const noexcept
|
||||
{
|
||||
return leaf_detail::make_error_id(check_id());
|
||||
}
|
||||
|
||||
template <class... E>
|
||||
error_id get_error( E && ... e ) const noexcept
|
||||
error_id assigned_error_id() const noexcept
|
||||
{
|
||||
return leaf_detail::make_error_id(get_id()).load(std::forward<E>(e)...);
|
||||
return leaf_detail::make_error_id(get_id());
|
||||
}
|
||||
};
|
||||
|
||||
@@ -2051,7 +2050,7 @@ namespace boost { namespace leaf {
|
||||
|
||||
std::tuple<Item...> p_;
|
||||
bool moved_;
|
||||
augment_id id_;
|
||||
error_monitor id_;
|
||||
|
||||
public:
|
||||
|
||||
@@ -2194,7 +2193,7 @@ namespace boost { namespace leaf {
|
||||
inline decltype(std::declval<F>()(std::forward<A>(std::declval<A>())...)) capture_impl(is_result_tag<R, false>, context_ptr && ctx, F && f, A... a)
|
||||
{
|
||||
auto active_context = activate_context(*ctx);
|
||||
augment_id aug;
|
||||
error_monitor cur_err;
|
||||
try
|
||||
{
|
||||
return std::forward<F>(f)(std::forward<A>(a)...);
|
||||
@@ -2210,7 +2209,7 @@ namespace boost { namespace leaf {
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
ctx->captured_id_ = aug.get_error();
|
||||
ctx->captured_id_ = cur_err.assigned_error_id();
|
||||
throw_exception( capturing_exception(std::current_exception(), std::move(ctx)) );
|
||||
}
|
||||
}
|
||||
@@ -2219,7 +2218,7 @@ namespace boost { namespace leaf {
|
||||
inline decltype(std::declval<F>()(std::forward<A>(std::declval<A>())...)) capture_impl(is_result_tag<R, true>, context_ptr && ctx, F && f, A... a)
|
||||
{
|
||||
auto active_context = activate_context(*ctx);
|
||||
augment_id aug;
|
||||
error_monitor cur_err;
|
||||
try
|
||||
{
|
||||
if( auto && r = std::forward<F>(f)(std::forward<A>(a)...) )
|
||||
@@ -2241,7 +2240,7 @@ namespace boost { namespace leaf {
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
ctx->captured_id_ = aug.get_error();
|
||||
ctx->captured_id_ = cur_err.assigned_error_id();
|
||||
throw_exception( capturing_exception(std::current_exception(), std::move(ctx)) );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -99,7 +99,7 @@ namespace boost { namespace leaf {
|
||||
inline decltype(std::declval<F>()(std::forward<A>(std::declval<A>())...)) capture_impl(is_result_tag<R, false>, context_ptr && ctx, F && f, A... a)
|
||||
{
|
||||
auto active_context = activate_context(*ctx);
|
||||
augment_id aug;
|
||||
error_monitor cur_err;
|
||||
try
|
||||
{
|
||||
return std::forward<F>(f)(std::forward<A>(a)...);
|
||||
@@ -115,7 +115,7 @@ namespace boost { namespace leaf {
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
ctx->captured_id_ = aug.get_error();
|
||||
ctx->captured_id_ = cur_err.assigned_error_id();
|
||||
throw_exception( capturing_exception(std::current_exception(), std::move(ctx)) );
|
||||
}
|
||||
}
|
||||
@@ -124,7 +124,7 @@ namespace boost { namespace leaf {
|
||||
inline decltype(std::declval<F>()(std::forward<A>(std::declval<A>())...)) capture_impl(is_result_tag<R, true>, context_ptr && ctx, F && f, A... a)
|
||||
{
|
||||
auto active_context = activate_context(*ctx);
|
||||
augment_id aug;
|
||||
error_monitor cur_err;
|
||||
try
|
||||
{
|
||||
if( auto && r = std::forward<F>(f)(std::forward<A>(a)...) )
|
||||
@@ -146,7 +146,7 @@ namespace boost { namespace leaf {
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
ctx->captured_id_ = aug.get_error();
|
||||
ctx->captured_id_ = cur_err.assigned_error_id();
|
||||
throw_exception( capturing_exception(std::current_exception(), std::move(ctx)) );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
namespace boost { namespace leaf {
|
||||
|
||||
class augment_id
|
||||
class error_monitor
|
||||
{
|
||||
#if !defined(BOOST_LEAF_NO_EXCEPTIONS) && BOOST_LEAF_STD_UNCAUGHT_EXCEPTIONS
|
||||
int const uncaught_exceptions_;
|
||||
@@ -27,7 +27,7 @@ namespace boost { namespace leaf {
|
||||
|
||||
public:
|
||||
|
||||
augment_id() noexcept:
|
||||
error_monitor() noexcept:
|
||||
#if !defined(BOOST_LEAF_NO_EXCEPTIONS) && BOOST_LEAF_STD_UNCAUGHT_EXCEPTIONS
|
||||
uncaught_exceptions_(std::uncaught_exceptions()),
|
||||
#endif
|
||||
@@ -63,15 +63,14 @@ namespace boost { namespace leaf {
|
||||
return leaf_detail::new_id();
|
||||
}
|
||||
|
||||
error_id check_error() const noexcept
|
||||
error_id check() const noexcept
|
||||
{
|
||||
return leaf_detail::make_error_id(check_id());
|
||||
}
|
||||
|
||||
template <class... E>
|
||||
error_id get_error( E && ... e ) const noexcept
|
||||
error_id assigned_error_id() const noexcept
|
||||
{
|
||||
return leaf_detail::make_error_id(get_id()).load(std::forward<E>(e)...);
|
||||
return leaf_detail::make_error_id(get_id());
|
||||
}
|
||||
};
|
||||
|
||||
@@ -202,7 +201,7 @@ namespace boost { namespace leaf {
|
||||
|
||||
std::tuple<Item...> p_;
|
||||
bool moved_;
|
||||
augment_id id_;
|
||||
error_monitor id_;
|
||||
|
||||
public:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user