|
Hallo, On 3/26/07, Lee Hickey <lahickey@gmail.com> wrote:
Is there a standard way to set a 'default' error handler for lua_pcall, rather than the usual method of inserting a c function into the stack before each pcall. I am currently setting up a global error handling function immediately after creating a lua_State, and using this, but this is prone to being obliterated by any C code which doesn't respect the stack properly.
You can create a C function my_pcall() that takes one less parameter and always push your customized error handler on the stack. Cheers, -- -alex http://www.ventonegro.org/