29#include <system_error>
79BSONCXX_PRIVATE_WARNINGS_PUSH();
80BSONCXX_PRIVATE_WARNINGS_DISABLE(MSVC(4251));
81BSONCXX_PRIVATE_WARNINGS_DISABLE(MSVC(4275));
89class exception :
public std::system_error {
92 std::shared_ptr<impl> _impl;
106 exception(std::error_code ec,
char const* message, std::unique_ptr<impl> impl);
109 exception(std::error_code ec, std::unique_ptr<impl> impl);
114BSONCXX_PRIVATE_WARNINGS_POP();
120struct std::is_error_condition_enum<
mongocxx::v1::source_errc> : true_type {};
123struct 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:38
@ mongocrypt
From the mongocrypt library.
Definition exception.hpp:42
@ mongoc
From the mongoc library.
Definition exception.hpp:41
@ server
From the MongoDB server.
Definition exception.hpp:43
@ zero
Zero.
Definition exception.hpp:39
std::error_condition make_error_condition(source_errc code)
Support implicit conversion to std::error_condition.
Definition exception.hpp:54
type_errc
Enumeration identifying the type (cause) of a mongocxx::v1 error.
Definition exception.hpp:61
@ runtime_error
An erroneous condition was detected at runtime.
Definition exception.hpp:64
@ invalid_argument
An invalid argument passed to the throwing function.
Definition exception.hpp:63
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.