From 371b39a09a0bf248d674fae718f5ff369e895b66 Mon Sep 17 00:00:00 2001 From: ShadowNinja Date: Tue, 5 Nov 2013 12:06:15 -0500 Subject: Pass a errfunc to lua_pcall to get a traceback --- src/script/common/c_internal.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/script/common/c_internal.h') diff --git a/src/script/common/c_internal.h b/src/script/common/c_internal.h index 9a50b8e96..eb6aa06e8 100644 --- a/src/script/common/c_internal.h +++ b/src/script/common/c_internal.h @@ -64,9 +64,10 @@ enum RunCallbacksMode // are converted by lua_toboolean to true or false, respectively. }; -std::string script_get_backtrace (lua_State *L); -void script_error (lua_State *L, const char *fmt, ...); -void script_run_callbacks (lua_State *L, int nargs, - RunCallbacksMode mode); +std::string script_get_backtrace(lua_State *L); +int script_error_handler(lua_State *L); +void script_error(lua_State *L); +void script_run_callbacks(lua_State *L, int nargs, + RunCallbacksMode mode); #endif /* C_INTERNAL_H_ */ -- cgit v1.2.3