lua-users home
lua-l archive

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



On 18-Aug-04, at 6:17 PM, Rob Sadedin wrote:

Hmmm, on a related note to this (but not the same), I'd like to 'throw' an error from a c function called from lua, that will include the line number
that lua was executing that called the c function.

Is this possible?

lua_pushliteral(L, "Ouch, you bit me!")
lua_error(L);

see also luaL_error for a printf-friendly version.