[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: No line number on nil function?
- From: "J. Perkins" <jason@<a href="/cgi-bin/echo.cgi?379.com">...</a>>
- Date: Wed, 13 Feb 2002 16:39:41 -0500
In my project, I have patched into luaD_error(), where I intercept
scripting errors, add on file and line number information using the
code from luaB__ERRORMESSAGE, and then quit the app (code available
If a syntax error occurs in a script this works fine, but if a
script tries to call a function that doesn't exist, ie. "attempt to
call global 'XXX' (a nil value)", no file/line info is available.
That is to say, 'lua_getstack(L, 1, &ar)' returns zero. In this
case, is there anyway to get the file/line where the error occurred?