[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Noob question -- On error, exit function and terminate script
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Sun, 26 Jun 2011 16:00:04 -0300
> 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