lua-users home
lua-l archive

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


>An other thing is that I would recommend using lua_pcall instead of lua_call.

lua_pcall is meant for when you must handle the error, for instance, by
showing a error message. lua_call is by far the most useful function; errors
that happen inside a lua_call will be automatically propagated back to the
last lua_pcall that was called before lua_call, typically the one that
initiated the whole process. This is almost always what you want and allows
for much cleaner programming. That's how the standalone interpreter works.
--lhf