[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: How do I get the filename and line number from a failed luaL_loadfile?
- From: "E. Wing" <ewmailing@...>
- Date: Wed, 20 Aug 2008 01:07:33 -0700
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
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.