lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Please disregard my previous question. On examining the C source for debug.traceback (db_errorfb in ldblib.c), I found that debug.traceback can take a thread as its first argument and provide a traceback of the call stack for that thread, which isn't unwound on error according to the manual's description of lua_resume. So this can be used with coroutine.resume as follows:

local succeeded, result = coroutine.resume(c)
if not succeeded then
 print(debug.traceback(c, result))

Problem solved.

Matt Campbell
Lead Programmer
Serotek Corporation
"The Accessibility Anywhere People"