[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: How to get tracebacks for coroutines?
- From: HyperHacker <hyperhacker@...>
- Date: Fri, 5 Aug 2011 14:54:08 -0600
2011/8/5 Ignacio Burgueño <firstname.lastname@example.org>:
> On Fri, Aug 5, 2011 at 5:00 PM, HyperHacker <email@example.com> wrote:
>> I've run into a bit of a hangup in developing an application that
>> makes heavy use of coroutines. When a coroutine crashes, I can see
>> where the error occurred, but not a stack traceback.
>> coroutine.resume() only returns the error message, and I can't wrap
>> the body in xpcall() because (in 5.1 at least) that's a C function, so
>> the coroutine becomes unable to yield. So, is there any way to get the
> Can't you use debug.traceback on the coroutine? It takes the coroutine as an
> optional argument.
Ahh, I can too. I didn't notice that. Thanks!
Sent from my toaster.