$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: Bjorn Reese (breese_at_[hidden])
Date: 2020-05-26 21:53:25
On 2020-05-25 22:21, Emil Dotchevski via Boost wrote:
> You mean, as in:
Good example.
> leaf::result<float> f(); // Returns a float or an error
>
> leaf::result<int> g() // Returns an int or an error
> {
> (void) f(); // Discard the float or the error returned by f
> return 42;
> }
Suppose there is also an h() function in the call stack that is being
called by the error_handler() function instead of g():
leaf::result<int> h()
{
auto res = g();
// How to detect that f() raised an error without knowing
// its error_id?
return res;
}
Can this function detect that someone further up the call stack has
already raised an error? Similar to std::uncaught_exceptions()?