8#include <userver/utils/traceful_exception.hpp>
12USERVER_NAMESPACE_BEGIN
14namespace formats::
bson {
19 BsonException(std::string msg);
21 std::string_view GetMessage()
const noexcept {
return msg_; }
35 explicit ExceptionWithPath(std::string_view msg, std::string_view path);
37 std::string_view GetPath()
const noexcept;
38 std::string_view GetMessageWithoutPath()
const noexcept;
41 std::size_t path_size_;
47 TypeMismatchException(bson_type_t actual, bson_type_t expected,
48 std::string_view path);
54 OutOfBoundsException(size_t index, size_t size, std::string_view path);
60 explicit MemberMissingException(std::string_view path);
66 ConversionException(std::string_view msg, std::string_view path);