[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua 5.3: assert non-string values in #2 cause `(no error message)`-style error message
- From: Roberto Ierusalimschy <roberto@...>
- Date: Mon, 20 Oct 2014 14:54:35 -0200
> You could add
>
> msg = lua_tostring(L, -1);
> if (msg)
> luaL_traceback(L, L, msg, 1);
>
> after the `lua_pushliteral` call in `msghandler`. (I'd prefer it
> that `msghandler` leaves all to-string conversions to the `report`
> function, though.)
When 'report' is called, there is no stack left to do a traceback.
-- Roberto