Boost logo

Boost :

Subject: Re: [boost] [system] Would it be possible to trial a breaking change to Boost.System and see what happens?
From: Peter Dimov (lists_at_[hidden])
Date: 2018-01-12 20:38:29

Andrey Semashev wrote:

> I don't think this matches my intent. The `foo` function belongs to the
> domain that defines error codes described by the `my_errors` enum and it
> is supposed to return one of those codes. Preserving whatever error
> category was set in `err` on entry does not achieve that. What I want is
> that `err` has `my_category` unconditionally on return from `foo`.

In the general case, foo can call bar, which can also fail and return
whatever error_code it likes. This is analogous to exceptions; mandating
that functions from a specific domain only ever throw exceptions from that
same domain quickly becomes burdensome.

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