12USERVER_NAMESPACE_BEGIN
18 explicit Exception(std::string msg)
19 : msg_(std::move(msg))
22 const char* what()
const noexcept final {
return msg_.c_str(); }
24 std::string_view GetMessage()
const noexcept {
return msg_; }
37 explicit ExceptionWithPath(std::string_view msg, std::string_view path);
39 std::string_view GetPath()
const noexcept;
40 std::string_view GetMessageWithoutPath()
const noexcept;
43 std::size_t path_size_;
48 explicit BadStreamException(
const std::istream& is);
49 explicit BadStreamException(
const std::ostream& os);
54 TypeMismatchException(
int actual,
int expected, std::string_view path);
55 std::string_view GetActual()
const;
56 std::string_view GetExpected()
const;
65 OutOfBoundsException(size_t index, size_t size, std::string_view path);
70 explicit MemberMissingException(std::string_view path);
76 ConversionException(std::string_view msg, std::string_view path);
81 UnknownDiscriminatorException(std::string_view path, std::string_view discriminator_field);