mirror of
https://gitcode.com/JianFeeeee/LuaCangjia_api.git
synced 2026-09-19 16:42:48 +00:00
27 lines
1.7 KiB
C
Executable File
27 lines
1.7 KiB
C
Executable File
#ifndef ERRORS
|
||
#define ERRORS
|
||
//用于定义napi中所有可能出现的错误,便于错误传递
|
||
#define NAPI_JSON_LOAD_FAIL 5001 //json文件加载错误
|
||
#define NAPI_MALLOC_FAIL 5002 //内存分配错误
|
||
#define NAPI_LOAD_FILE_ERROR 5003 //文件加载错误,可能为权限或路径问题
|
||
#define NAPI_SCRIPT_RUNNER_INVALID 5004 //脚本运行器初始化错误,脚本运行器异常
|
||
#define NAPI_LUA_STATE_ERROR 5005 //lua状态机初始化错误或损坏
|
||
#define NAPI_JSON_RESOLVE_FAIL 5006 //json解析错误,可能为格式错误等
|
||
#define NAPI_JSON_FORMATE_ERROR 5007 //json格式错误(与mcp常见格式不符)
|
||
#define NAPI_MISSING_JSON_ARG 5008 //无法从json中解析到参数
|
||
#define NAPI_LUA_STACK_NOSPACE 5009 //lua状态机栈空间不足
|
||
#define NAPI_SCRIPT_ERROR 5010 //脚本内部错误,取result获取更多信息
|
||
#define NAPI_SCRIPT_BAD_RET 5011 //脚本返回值错误
|
||
#define NAPI_UNLOADLIB_FAIL 5012 // 释放的库未被加载
|
||
#define NAPI_LUAFUN_NOFOUND 5013 //调用不符合规定,没有遵守单入参单出参约定
|
||
#define NAPI_LUA_STACK_ERROR 5014 //函数调用时,栈大小小于约定最小大小
|
||
#define NAPI_LUA_INITFILE 5015 //lua状态机初始化错误
|
||
#define NAPI_LUALIB_LOAD_OVER_STACK 5016 //加载太多lib
|
||
#define NAPI_LUA_CLASS_LOST 5017 //luarunner对象丢失
|
||
#define NAPI_LUA_MISS_REDIRECT 5018 //漏传用于重定向的文件路径
|
||
#define NAPI_RESET_INPUT_FILE_ERROR 5019 //重置输入文件失败,可能造成输入污染
|
||
#define NAPI_ERROR_FUNCS 5020 //函数调用错误
|
||
#define NAPI_CHDIR_ERROR 5021 //切换工作目录失败,可能导致包搜索错误,日志写入路径错误等
|
||
#define NAPI_NOCHUNK_FOUND 5022 //没有找到待调用的函数
|
||
|
||
#endif |