[Date Prev][Date Next][Thread Prev][Thread Next]
- 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
> In Lua 5.1 we had this function, but it got removed 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:
Anonymous Lua User