[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Adding debug hook for error/yield/resume
- From: Paul K <paulclinger@...>
- Date: Mon, 17 Mar 2014 18:28:08 -0700
> 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
>