diff options
author | sanine-a <sanine.not@pm.me> | 2020-10-24 19:54:18 -0500 |
---|---|---|
committer | sanine-a <sanine.not@pm.me> | 2020-10-24 19:54:18 -0500 |
commit | 27292f0d9ed90340792d4d065fefd2e4e248e4bd (patch) | |
tree | 52fd2a6743a0bc9c392de83583cd31c6411e3da9 /src/common.h | |
parent | 2cf300b870659a44d4e73ab65c035f6f443c3d25 (diff) |
add honey_lua_pcall with traceback ability
Diffstat (limited to 'src/common.h')
-rw-r--r-- | src/common.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/common.h b/src/common.h index 47b7ee4..63962db 100644 --- a/src/common.h +++ b/src/common.h @@ -153,4 +153,12 @@ void honey_lua_create_table(lua_State* L, honey_lua_element* elements, unsigned int n_elements); +/** @brief Get the traceback for use after an error. + */ +int honey_lua_traceback(lua_State* L); + +/** @brief Wrapper for lua_pcall that uses a honey_lua_traceback as an error handler. + */ +int honey_lua_pcall(lua_State* L, int nargs, int nret); + #endif |