Boost logo

Boost :

Subject: Re: [boost] [outcome] Ternary logic -- need an example
From: Vinnie Falco (vinnie.falco_at_[hidden])
Date: 2017-05-20 14:05:17


On Sat, May 20, 2017 at 3:12 AM, Bjorn Reese via Boost
<boost_at_[hidden]> wrote:
> When I perform an asynchronous HTTP operation that returns an error_code
> then I prefer that the error_code contains a unified response, i.e. an
> HTTP status code, a system error code (e.g. network problem), or an
> internal library error code.

A nice thing about HTTP (if there is any such thing) is that the HTTP
"message" can be modeled as a self contained object.

The low-level result of the asynchronous operation (for example
boost::asio::error::connection_reset) reflects metadata about the HTTP
message and should not be part of that container.

However, the status code is part of the message and therefore should
be part of the container. I do not think it should be treated as
metadata, nor represented using error_code.


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