18 #include <system_error>
20 #include <bsoncxx/config/prelude.hpp>
23 BSONCXX_INLINE_NAMESPACE_BEGIN
28 enum class error_code : std::int32_t {
29 k_cannot_append_key_in_sub_array = 1,
30 k_cannot_close_array_in_sub_document,
31 k_cannot_close_document_in_sub_array,
32 k_cannot_perform_array_operation_on_document,
33 k_cannot_perform_document_operation_on_array,
34 #define BSONCXX_ENUM(name, value) k_need_element_type_k_##name,
35 #include <bsoncxx/enums/type.hpp>
39 k_no_document_to_close,
40 k_unmatched_key_in_builder,
44 k_failed_converting_bson_to_json,
52 BSONCXX_API
const std::error_category& BSONCXX_CALL error_category();
60 BSONCXX_INLINE std::error_code make_error_code(error_code error) {
61 return {
static_cast<int>(error), error_category()};
64 BSONCXX_INLINE_NAMESPACE_END
67 #include <bsoncxx/config/postlude.hpp>
72 struct is_error_code_enum<
bsoncxx::error_code> :
public true_type {};
Definition: error_code.hpp:69
Definition: element.hpp:24