[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: assert with any type as message (like error)
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Wed, 2 Jul 2014 09:24:14 -0300
> Unfortunately, it is not possible with assert, you *must* pass a string.
> I think it can be great to also have assert working like error so the
This is supported in Lua 5.3.0 (work3).
For Lua 5.2, you can simply redefine assert:
if cond then
This is how assert is implemented in 5.3.