Re: Extending assert () functionality
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: Extending assert () functionality
- From: HyperHacker <hyperhacker@...>
- Date: 2011年6月25日 17:42:23 -0600
On Sat, Jun 25, 2011 at 16:24, Rebel Neurofog <rebelneurofog@gmail.com> wrote:
>> function assert(cond, err)
>> if cond then return cond
>> else error(err or "assertion failed")
>> end
>> end
>
> Not excactly. This one is closer:
>
> function assert(cond, err, ...)
> if cond then return cond, err, ...
> else error(err or "assertion failed")
> end
> end
>
>
Whoops, good catch.
--
Sent from my toaster.