[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: RE: Stack trace of errored coroutines?
- From: "Jasmin Patry" <jpatry@...>
- Date: Thu, 26 Feb 2004 18:46:41 -0800
I've looked into this issue a little more, but haven't made any progress. In lua_resume() in ldo.c, this line appears immediately before the call to luaD_rawrunprotected:
lua_assert(L->errfunc == 0 && L->nCcalls == 0);
Is there a fundamental reason why coroutines cannot have error functions? I suppose I could try it and see, which is probably what I will do next. ;)
Note that wrapping the coroutine func with pcall() is not an option, since it is not possible to yield across the C-call boundary.
Thanks,
Jasmin
> -----Original Message-----
> From: Jasmin Patry
> Sent: February 25, 2004 5:05 PM
> To: Lua list (E-mail)
> Subject: Stack trace of errored coroutines?
>
>
>
> An (apparently unanswered) email to this list a few months
> back asked a question that I now am seeking an answer to:
>
> http://lua-users.org/lists/lua-l/2003-08/msg00435.html
>
> In short, I am wondering how to register an error handler
> with coroutine.resume so that I can obtain a stack trace to
> the location of the error inside the coroutine. This doesn't
> appear to be possible using the standard libraries supplied
> with Lua. Has anybody written their own version of
> coroutine.resume that works this way?
>
> Cheers,
> Jasmin
>
>
>