#ifndef RTX_ERROR_CODE_H
#define RTX_ERROR_CODE_H

#include <cstdint>

namespace rtx
{
    namespace exception
    {
        // 错误码类型（可按模块划分）
        enum class ErrorCode : uint32_t
        {
            UNKNOWN = 999,
            // 通用错误 1000-1999
            INVALID_ARGUMENT = 1000,
            PARSE_JSON_RESPONSE_ERROR = 1001,
            // 网络错误 2000-2199
            NETWORK_TIMEOUT = 2000,
            NETWORK_ERROR = 2001,
            DNS_ERROR = 2002,
            GET_GATEWAY_NULL = 2003,

            // 文件错误 2200-2399
            CONFIG_FILE_NOT_FOUND = 2200,
            // 序列化错误 2400-2499
            SERIALIZE_MISMATCH_ARITHMETIC_VALUE = 2400,
            SERIALIZE_MISMATCH_STRING_VALUE = 2401,
            SERIALIZE_MISMATCH_ENUM_VALUE = 2402,
            SERIALIZE_INVALID_ENUM_VALUE = 2403,
            SERIALIZE_EXPECTED_ARRARY_VALUE = 2404,
            SERIALIZE_EXPECTED_OBJECT_VALUE = 2405,
            SERIALIZE_MISSING_FIELD = 2405
        };

        namespace gatewayCode
        {
            const int SUCCEEDED = 200;
        };
    }
}

#endif