lua-users home
lua-l archive

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


> Only bug i found (so far): when using
> 
> error("oops", 2)
> 
> the second argument seems to have no effect whatsoever, even 0 doesn't
> show any difference in the stack trace.

You're right, the stack trace is the same; perhaps it should be different.
But the line displayed near the "oops" does depend on the level given to error.
Consider the code below. With level=2 you get
	./lua: test.lua:6: oops

With level=1 you get
	./lua: test.lua:2: oops

BTW, this behavior is the same in 5.1 and in 5.2.
--

function f()
	error("oops",3)
end

function g()
	f()
end

function h()
	g()
end

h()