[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Feature request: make typeerror public somehow
- From: Steven Degutis <sbdegutis@...>
- Date: Wed, 24 Dec 2014 13:00:15 -0600
> What about `luaL_argcheck(L, is_point(L, 1), 1, "point expected")`?
If I use luaL_argcheck, which is essentially just luaL_argerror, then
I have to manually figure out the type name of the actual argument and
create an according error message, which is exactly what typeerror
does.
> In Lua 5.1 we had[1] this function, but it got removed[2] in Lua 5.2. To be
> fair, it was a trivial function then, but now got a little more complex for
> Lua 5.3.
Sorry, I'm not understanding. This is the trivial function I added to
Lua, which seems to work:
https://github.com/sdegutis/diywm/commit/13598c9e23ca0b3c8bf29447da22f6ab1bf768fd
Regards,
Anonymous Lua User