[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Tracebacks in coroutines
- From: Brian Hook <hook_l@...>
- Date: Sat, 6 Mar 2004 21:25:23 -0500
> Of course, all this does is generate a traceback; it is still
> necessary to check the return from coroutine.resume/lua_resume.
Just a minor addendum (since Rici sorted this out for me in the IRC
channel -- thanks Rici!), you basically just wrap your call to
coroutine.resume() in an assert and/or call your own resume function
that checks the return values.
Works like a charm, and has saved me a HUGE amount of headache because
I wasn't getting a traceback when things started exploding in my code
(mostly to do with nil variables, calls to nil functions, the latter
two mostly caused by typos/cut-paste errors).