lua-users home
lua-l archive

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


Hi,
users of my application are calling for detailed error tracking in lua scripts. For now I just register the _ERRORMESSAGE by

...
// redirect the error handling 
lua_register(L, "_ERRORMESSAGE", error);
...

// error handling routine
static int error(lua_State * L)
{
    DisplayError( lua_tostring(L, 1) );
    return 0;
} 
...

Is there any way how to get also the line number in script which has caused an error?

Thanx
ptaczek.