boost::capy::cond

Portable error conditions for capy I/O operations.

Synopsis

Declared in <boost/capy/cond.hpp>

enum class cond : int;

Description

These are the conditions callers should compare against when handling errors from capy operations. The error enum values map to these conditions, as do platform‐specific error codes (e.g., ECANCELED, SSL EOF errors).

Example

auto [ec, n] = co_await stream.read_some( bufs );
if( ec == cond::canceled )
    // handle cancellation
else if( ec == cond::eof )
    // handle end of stream
else if( ec )
    // handle other errors

Members

Name

Description

eof

End‐of‐stream condition.

canceled

Operation cancelled condition.

stream_truncated

Stream truncated condition.

not_found

Item not found condition.

See Also

error

Created with MrDocs