MongoDB C++ Driver  mongocxx-3.0.2
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. More...
 
const stdx::optional< bsoncxx::document::value > & raw_server_error () const
 The optional raw bson error document from the server. More...
 
stdx::optional< bsoncxx::document::value > & raw_server_error ()
 The optional raw bson error document from the server. More...
 

Detailed Description

Todo:
document this class

Constructor & Destructor Documentation

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

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.
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.

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