lua-users home
lua-l archive

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

> When throwing an error, you want the user to know where in the source
> the error is, not where error is called. Removing the stack index
> parameter will most likely make it useless for
> module/library/framework writers.

Indeed. But absolute stack level delta is actually kind of not
comfortable enough. One has to use different stack levels for
different "system call" nesting levels. Like this:

function sys_foo(level)
  error("foo", (level or 1) + 1)

function sys_bar(level)
  foo((level or 1) + 1)

I like the idea with marking call frames as "hidden" instead. This
should reduce the hassle.