xxxxxxxxxx
== Example 3 ==
Using debugstack to find out the location of an error in a coroutine.
1: function f()
2: print ("a">0) -- this will cause an error
3: end
4:
5: thread = coroutine.create(f)
6: executed_ok,message = coroutine.resume(thread)
7:
8: if not executed_ok then
9: print("Error: "..message.." in "..debugstack(thread))
10: end
Note that despite its all-lowercase name, this is not a core [[Lua]] function. It is a WoW API.