Boost logo

Boost :

Subject: Re: [boost] [outcome] High level summary of review feedback accepted so far
From: Andrzej Krzemienski (akrzemi1_at_[hidden])
Date: 2017-05-31 13:59:42


2017-05-31 15:45 GMT+02:00 Niall Douglas via Boost <boost_at_[hidden]>:

> On 31/05/2017 14:25, Andrzej Krzemienski via Boost wrote:
> > 2017-05-31 15:17 GMT+02:00 Niall Douglas via Boost <
> boost_at_[hidden]>:
> >>
> >> If you need a motivating example, imagine a user accumulates result<T>'s
> >> from other code it calls into outcome<T>'s, and then does .exception()
> >> on the outcome<T>'s.
> >>
> >
> > Yes, I can understand why one wants to treat error_code and exception_ptr
> > uniformly. But recognizing an error_code in `exception()` and not
> > recognizing an exception_ptr in `error()` looks quite arbitrary to me:
> not
> > guided ba an intuitive mental model.
>
> Not at all.
>

I have a problem combining these two replies:

>
> Errors are not exceptional. They are expected failure.
>
> Exceptions are exceptional. They are **un**expected failure.
>

And this one:

Let me repeat: **exceptional** means either error_code or exception_ptr.
> **error** means only error_code.
>
> You can think of it like this: failure to explicitly check for an error
> results in an exceptional circumstance.
>

Errors -- usual failure, Exceptions -- exceptional failure. Ok. But when I
call `error()` it is like saying "tell me if a *usual* failure ocurred", I
get no exception, fine. When I call `exception()` it is like saying "tell
me if an *exceptional* failure ocurred", and you are giving me a
non-exceptional one.

This does not (yet) sound consistent to me.

Regards,
&rzej;


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk