lua-users home
lua-l archive

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


Hi,

> - Where is the error message I send with "lua_error()"? 

You call lua_error with your own error when your code that is called 
by lua detects an error of some sort.

> - Where I can get it after the error? maybe in "lua_atpanic()"?

The way I see it the routine called by lua_atpanic is used as a last 
resort. If you use lua_pcall() or similar or have your own functions 
that load Lua code then you get the error message at the top 
of the stack and a error return code when a error occurs (including 
lua_error being called). There of examples of this in the auxlib I 
think.

This is another reason (IMHO) that Lua 5.0 is much cleaner in its 
interface than Lua 4.0.

Cheers,
Paul.