diff options
author | Oran Agra <oran@redislabs.com> | 2022-02-28 15:35:46 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-28 15:35:46 +0200 |
commit | d2b5a579dd8b785690aa7714df8776ffc452d242 (patch) | |
tree | 1c54c71bae68eaa44efbf89020d75399a88dee40 /src/script_lua.h | |
parent | d5915a167f696644e210ee85e549c7ceb41b5791 (diff) | |
parent | 10dc57ab226155bbdbfb0b0d914e681aa346d7de (diff) | |
download | redis-7.0-rc2.tar.gz |
Merge pull request #10355 from oranagra/release-7.0-rc27.0-rc2
Release 7.0 RC2
Diffstat (limited to 'src/script_lua.h')
-rw-r--r-- | src/script_lua.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/script_lua.h b/src/script_lua.h index ac13178ca..5a4533784 100644 --- a/src/script_lua.h +++ b/src/script_lua.h @@ -58,6 +58,13 @@ #define REGISTRY_SET_GLOBALS_PROTECTION_NAME "__GLOBAL_PROTECTION__" #define REDIS_API_NAME "redis" +typedef struct errorInfo { + sds msg; + sds source; + sds line; + int ignore_err_stats_update; +}errorInfo; + void luaRegisterRedisAPI(lua_State* lua); sds luaGetStringSds(lua_State *lua, int index); void luaEnableGlobalsProtection(lua_State *lua, int is_eval); @@ -65,11 +72,14 @@ void luaRegisterGlobalProtectionFunction(lua_State *lua); void luaSetGlobalProtection(lua_State *lua); void luaRegisterLogFunction(lua_State* lua); void luaRegisterVersion(lua_State* lua); -void luaPushError(lua_State *lua, char *error); -int luaRaiseError(lua_State *lua); +void luaPushErrorBuff(lua_State *lua, sds err_buff); +void luaPushError(lua_State *lua, const char *error); +int luaError(lua_State *lua); void luaSaveOnRegistry(lua_State* lua, const char* name, void* ptr); void* luaGetFromRegistry(lua_State* lua, const char* name); void luaCallFunction(scriptRunCtx* r_ctx, lua_State *lua, robj** keys, size_t nkeys, robj** args, size_t nargs, int debug_enabled); +void luaExtractErrorInformation(lua_State *lua, errorInfo *err_info); +void luaErrorInformationDiscard(errorInfo *err_info); unsigned long luaMemory(lua_State *lua); |