Skip to content
LeviMC
English
AutoLightDark
LeviLamina
Loading...
Searching...
No Matches
ReflectionError.h
1#pragma once
2
3#include <cstddef>
4#include <stdexcept>
5#include <string>
6#include <string_view>
7
8#include "ll/api/Expected.h"
9
10namespace ll::reflection {
11LLNDAPI Unexpected makeSerObjectTypeError() noexcept;
12LLNDAPI Unexpected makeSerMemberError(std::string_view name, Error& err) noexcept;
13LLNDAPI Unexpected makeSerIndexError(std::size_t idx, Error& err) noexcept;
14LLNDAPI Unexpected makeSerKeyError(std::string_view key, Error& err) noexcept;
15
16LLNDAPI Unexpected makeDeserMemberError(std::string_view name, Error& err) noexcept;
17LLNDAPI Unexpected makeDeserIndexError(std::size_t idx, Error& err) noexcept;
18LLNDAPI Unexpected makeDeserKeyError(std::string_view key, Error& err) noexcept;
19LLNDAPI Unexpected makeDeserArithmeticTypeError() noexcept;
20LLNDAPI Unexpected makeDeserNumberTypeError(std::string_view actualType) noexcept;
21LLNDAPI Unexpected makeDeserNumberRangeError(std::string_view valueText, std::string_view targetType) noexcept;
22LLNDAPI Unexpected makeDeserNumberFractionError(std::string_view valueText) noexcept;
23LLNDAPI Unexpected makeDeserStringTypeError() noexcept;
24LLNDAPI Unexpected makeDeserStringViewLifetimeError() noexcept;
25LLNDAPI Unexpected makeDeserArrayTypeError() noexcept;
26LLNDAPI Unexpected makeDeserObjectTypeError() noexcept;
27LLNDAPI Unexpected makeDeserEnumValueError(std::string_view value) noexcept;
28LLNDAPI Unexpected makeDeserEnumFlagsValueError(std::string_view value) noexcept;
29LLNDAPI Unexpected makeDeserEnumTypeError() noexcept;
30LLNDAPI Unexpected makeDeserInvalidKeyError(std::string_view key) noexcept;
31LLNDAPI Unexpected makeDeserArraySizeError(std::size_t expectedSize) noexcept;
32LLNDAPI Unexpected makeDeserMissingRequiredFieldError(std::string const& fieldName) noexcept;
33LLNDAPI Unexpected makeDeserVariantCastError(std::string_view actualType, std::string_view dumpedValue) noexcept;
34} // namespace ll::reflection