Couchbase C++ SDK 1.3.2 (rev. 49d3be2)
Loading...
Searching...
No Matches
error Class Reference

#include <couchbase/error.hxx>

Public Member Functions

 error ()=default
 error (std::error_code ec, std::string message={}, error_context ctx={})
 error (std::error_code ec, std::string message, error_context ctx, error cause)
 error (std::error_code ec, std::string message, error_context ctx, couchbase::node_id node_id)
auto ec () const -> std::error_code
auto message () const -> const std::string &
auto ctx () const -> const error_context &
auto cause () const -> std::optional< error >
auto node_id () const -> const couchbase::node_id &
 Returns the identity of the cluster node where the error occurred.
 operator bool () const
auto operator== (const error &other) const -> bool

Constructor & Destructor Documentation

◆ error() [1/4]

error ( )
default

◆ error() [2/4]

error ( std::error_code ec,
std::string message = {},
error_context ctx = {} )

◆ error() [3/4]

error ( std::error_code ec,
std::string message,
error_context ctx,
error cause )

◆ error() [4/4]

error ( std::error_code ec,
std::string message,
error_context ctx,
couchbase::node_id node_id )

Member Function Documentation

◆ cause()

auto cause ( ) const -> std::optional< error >
nodiscard

◆ ctx()

auto ctx ( ) const -> const error_context &
nodiscard

◆ ec()

auto ec ( ) const -> std::error_code
nodiscard

◆ message()

auto message ( ) const -> const std::string &
nodiscard

◆ node_id()

auto node_id ( ) const -> const couchbase::node_id &
nodiscard

Returns the identity of the cluster node where the error occurred.

The returned node_id is default-constructed (falsy) when the node could not be determined (e.g. for non-KV errors).

Returns
identity of the node that returned the error
Since
1.3.2
Uncommitted
Might be changed in the future, and eventually promoted to committed

◆ operator bool()

operator bool ( ) const
explicit

◆ operator==()

auto operator== ( const error & other) const -> bool

The documentation for this class was generated from the following file: