Boost logo

Boost :

From: Bjorn Reese (breese_at_[hidden])
Date: 2020-06-03 14:23:09

On 2020-06-02 04:37, Emil Dotchevski via Boost wrote:

> I'll add that the the lowest level API exposed by LEAF works directly with
> the context<> type. You could:
> leaf::context<E1, E2, E3> ctx;
> ctx.activate();
> .....; // call functions that report E1, E2, E3 errors, obtain an error_id
> ctx.deactivate();
> .....; // possibly move ctx somewhere else
> R r = ctx.handle_error<R>(id, <list of error handlers>);
> I'm showing this because depending on the use case it might be useful;
> context<> is very similar to tuple<>, and so you could move it about and
> handle errors later. As I type this, i realize that Bjorn is right that
> this needs a get<I> interface.

I somehow missed the context::handle_error() function during the review.
This addresses my main concern about avoiding wrapping the "TryBlock".

Review manager: This changes my conditional accept into an unconditional

Boost list run by bdawes at, gregod at, cpdaniel at, john at