Boost logo

Boost :

Subject: Re: [boost] [outcome] High level summary of review feedback accepted so far
From: Niall Douglas (s_sourceforge_at_[hidden])
Date: 2017-05-31 13:17:40


On 31/05/2017 12:02, Andrzej Krzemienski via Boost wrote:
> 2017-05-31 12:47 GMT+02:00 Niall Douglas via Boost <boost_at_[hidden]>:
>>> But is there some mental model behind this decision?
>>
>> Of course.
>>
>> exception <= error < value. So errors are exceptions, but exceptions are
>> not errors.
>>
>
> I still don't get it. Maybe what you are saying that "error" refers to both
> error_codes and exception_ptr-s, whereas "exception" refers to
> exception_ptr-s exclusively?

Other way round. Exception refer to exception|error. Error refers to
just error.

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.

Niall

-- 
ned Productions Limited Consulting
http://www.nedproductions.biz/ http://ie.linkedin.com/in/nialldouglas/

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