[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Stack trace of errored coroutines?
- From: Andy Sloane <andy@...>
- Date: Thu, 28 Aug 2003 22:07:43 -0500
We've got a lua_atpanic() handler in our application which just dumps a
stack trace using the simple Lua debug interface functions. That works
fine, except whenever a coroutine does something stupid.
Errant coroutines, of course, cause coroutine.resume() to return (false,
message), and the message is fairly informative, but a stack trace would be
much more helpful. If we error() out at that point, we just get a stack
trace leading up to the coroutine.resume() -- the rest of the stack is
unwound by that point, naturally.
Is there any simple way to "panic" or at least get a stack trace after a
coroutine breaks but before the stack unwinds?
-Andy