lua-users home
lua-l archive

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


After read the lua source,get it,when resume error,the error message is saved in lua stack.


On Tue, Aug 6, 2013 at 6:10 PM, chuang <lichuang1982@gmail.com> wrote:
As we know,when C call Lua API,we can register a error function and use pcall, when an error occur in Lua scripts,it will call the error function.

But,when Lua call a C api,and in the C api it resume a coroutine,after the coroutine continue to execute, it occour an error such as call a nil function.In this  case,how to catch the error infomation and show some error log?