lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> Isn't xpcall enough?

No, because I need it to work for chunks I didn't load. Essentially, I
need to support this:

some user code
startdebugger()
more code
run-time error here

For those cases where I start the script myself (and have full control
over the context/environment), I already handle the errors. However in
most cases the starting point is controlled by the user, hence the
request.

Paul.

On Mon, Mar 17, 2014 at 4:45 PM, Roberto Ierusalimschy
<roberto@inf.puc-rio.br> wrote:
>> I'd like to move this debug.traceback discussion from LuaJIT maillist
>> here [1]. debug.traceback used to be the only mechanism to catch
>> run-time errors for code chunks you didn't load yourself and it
>> appears that this mechanism is not available in Lua 5.2+ or LuaJIT as
>> debug.traceback is not called anymore in those cases.
>
> Isn't xpcall enough?
>
> -- Roberto
>