lua-users home
lua-l archive

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


Frederico Rodrigues Abraham wrote:

> The line where the error happened seems correct. (line 10,
> the call to p2() in p1 body)

A human interpreting the code can pick one line where the
error occurs, but which line that will be depends on the
context.  As far as Lua is concerned, the error takes place
just as much on lines 2 and 6 as it does on lines 10, 15,
and 19.

In other words, does an error occur on line 2?  Yes, because
that's where "error" is called.  Does an error occur on line
19?  Yes, because that's where a function ("luaf") is called
that calls a function ("p1") that calls a function ("p2")
that calls a function ("p3") where "error" is called.

-- 
Aaron