lua-users home
lua-l archive

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


> But for now it can only be emulated like that (as far as I know):
> 
> function assert2 (expr, message, ...)
>    if expr then
>       return expr, message, ...
>    end
>    if type (message) == "function" then
>       return assert (expr, message (), ...)
>    end
>    return assert (expr, message, ...)
> end

See also http://lua-users.org/lists/lua-l/2010-05/msg00494.html