[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: level argument for assert
- From: Thijs Schreijer <thijs@...>
- Date: Tue, 1 Jan 2013 09:33:29 +0000
The error function is defined as;
error (message [, level])
The assert function is defined as;
assert (v [, message])
Is there a specific reason the assert function doesn't have a 'level' argument that allows to throw the error up some levels? Eg. have assert defined as;
assert (v [, message [, level]])
Currently I use;
if not v then error(message, level) end
But I would prefer the shorter assert notation
Thijs