[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: compile-time error line numbers
- From: Mark Hamburg <mhamburg@...>
- Date: Mon, 17 May 2004 08:17:48 -0700
See luaX_errorline. I modified it to return a table containing the line
number along with the error message. That does require a little more work
for processing errors on the other end though you can mitigate some of it by
including a metatable with a __tostring metamethod on the table.
Mark
P.S. Is there a fundamental reason why __tostring isn't able to be a string
rather than a function?
on 5/16/04 8:39 AM, Will Leshner at leshner@ljug.com wrote:
> Excuse me if this is very basic, but I'm wondering if there is a way to
> get line number for errors that occur when Lua compiles a chunk. I'm
> doing luaL_loadbuffer() and I do get errors, but no line numbers. I'd
> like to be able to report back to the user exactly what line the error
> occurred on.
>
> Thanks.
>