MongoDB C++ Driver mongocxx-3.0.3
Loading...
Searching...
No Matches
Public Member Functions | List of all members
mongocxx::operation_exception Class Reference

#include <operation_exception.hpp>

+ Inheritance diagram for mongocxx::operation_exception:

Public Member Functions

 operation_exception (std::error_code ec, bsoncxx::document::value &&raw_server_error, std::string what_arg="")
 Constructs a new operation exception.
 

Detailed Description

Todo:
document this class

Constructor & Destructor Documentation

◆ operation_exception()

mongocxx::operation_exception::operation_exception ( std::error_code  ec,
bsoncxx::document::value &&  raw_server_error,
std::string  what_arg = "" 
)

Constructs a new operation exception.

Parameters
ecThe error code associated with this exception.
raw_server_errorThe optional raw bson error document to be associated with this exception.
what_argAn optional message to be returned by what.

Member Function Documentation

◆ raw_server_error() [1/2]

stdx::optional< bsoncxx::document::value > & mongocxx::operation_exception::raw_server_error ( )

The optional raw bson error document from the server.

Returns
The raw server error, if it is available.

◆ raw_server_error() [2/2]

const stdx::optional< bsoncxx::document::value > & mongocxx::operation_exception::raw_server_error ( ) const

The optional raw bson error document from the server.

Returns
The raw server error, if it is available.

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