summaryrefslogtreecommitdiff
path: root/src/common.h
diff options
context:
space:
mode:
authorsanine-a <sanine.not@pm.me>2020-10-24 19:54:18 -0500
committersanine-a <sanine.not@pm.me>2020-10-24 19:54:18 -0500
commit27292f0d9ed90340792d4d065fefd2e4e248e4bd (patch)
tree52fd2a6743a0bc9c392de83583cd31c6411e3da9 /src/common.h
parent2cf300b870659a44d4e73ab65c035f6f443c3d25 (diff)
add honey_lua_pcall with traceback ability
Diffstat (limited to 'src/common.h')
-rw-r--r--src/common.h8
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