29#include <system_error>
91BSONCXX_PRIVATE_WARNINGS_PUSH();
92BSONCXX_PRIVATE_WARNINGS_DISABLE(MSVC(4251));
93BSONCXX_PRIVATE_WARNINGS_DISABLE(MSVC(4275));
103class exception :
public std::system_error {
106 std::shared_ptr<impl> _impl;
120 exception(std::error_code ec,
char const* message, std::unique_ptr<impl> impl);
123 exception(std::error_code ec, std::unique_ptr<impl> impl);
128BSONCXX_PRIVATE_WARNINGS_POP();
134struct std::is_error_condition_enum<
mongocxx::v1::source_errc> : true_type {};
137struct std::is_error_condition_enum<
mongocxx::v1::type_errc> : true_type {};
A polyfill for std::string_view.
Definition string_view.hpp:412
bool has_error_label(bsoncxx::v1::stdx::string_view label) const
Return true if this exception contains the specified error label.
Provides macros to control the set of symbols exported in the ABI.
#define MONGOCXX_ABI_CDECL
Expands to __cdecl when built with MSVC on Windows.
Definition export.hpp:49
#define MONGOCXX_ABI_NO_EXPORT
Excludes the associated entity from being part of the ABI.
Definition export.hpp:20
#define MONGOCXX_ABI_EXPORT_CDECL(...)
Equivalent to MONGOCXX_ABI_EXPORT with MONGOCXX_ABI_CDECL.
Definition export.hpp:52
The mongocxx v1 macro guard postlude header.
The mongocxx v1 macro guard prelude header.
Declares mongocxx error-handling utilities.
Declares entities whose ABI stability is guaranteed for documented symbols.
source_errc
Enumeration identifying the source of a mongocxx::v1 error.
Definition exception.hpp:40
@ mongocrypt
From the mongocrypt library.
Definition exception.hpp:44
@ mongoc
From the mongoc library.
Definition exception.hpp:43
@ server
From the MongoDB server.
Definition exception.hpp:45
@ zero
Zero.
Definition exception.hpp:41
std::error_condition make_error_condition(source_errc code)
Support implicit conversion to std::error_condition.
Definition exception.hpp:60
type_errc
Enumeration identifying the type (cause) of a mongocxx::v1 error.
Definition exception.hpp:69
@ runtime_error
An erroneous condition was detected at runtime.
Definition exception.hpp:72
@ invalid_argument
An invalid argument passed to the throwing function.
Definition exception.hpp:71
std::error_category const & type_error_category()
The error category for mongocxx::v1::type_errc.
std::error_category const & source_error_category()
The error category for mongocxx::v1::source_errc.
The top-level namespace within which all mongocxx library entities are declared.
Provides std::string_view-related polyfills for library API usage.