[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: lua_pcall error handler
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Wed, 8 Jan 2003 22:24:08 -0200
>Can anyone point me to an example of how to get a stack traceback using an
>error handler and lua_pcall?
The standard traceback you get in the standalone interpreter when an
error happens is output using this scheme (of course!). See lcall in
lua.c in Lua 5.0 (beta). It runs code by setting the value of the
global variable _TRACEBACK as an error handler. The debug library sets
_TRACEBACK (see errorfb in ldblib.c).
--lhf