lua-users home
lua-l archive

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


I want to get the filename (with absolute path) and line number
reported from luaL_loadfile. Is there a reliable way to get at this
data?

I have thought about parsing the error string returned on the stack,
but I see two problems with this. First, I don't consider parsing a
very reliable way of doing this. Second, I noticed that for long path
names, the file/path name gets truncated so it isn't very useful for
me even if I did successfully parse the string.

My intention is to use the filename and line number returned to launch
a text editor from my program at the location of the lua error to make
fixing bugs much easier.

Thanks,
Eric