Difference between revisions of "assert"

From Inspired-Lua Wiki
Jump to navigation Jump to search
(Created page with "The assert() function is a way to execute functions. assert(foo, errmsg) It will try to execute the function foo and will send errmsg as an error if it fail.")
 
Line 1: Line 1:
 
The assert() function is a way to execute functions.
 
The assert() function is a way to execute functions.
 +
 
assert(foo, errmsg)
 
assert(foo, errmsg)
 +
 
It will try to execute the function foo and will send errmsg as an error if it fail.
 
It will try to execute the function foo and will send errmsg as an error if it fail.

Revision as of 21:55, 8 November 2014

The assert() function is a way to execute functions.

assert(foo, errmsg)

It will try to execute the function foo and will send errmsg as an error if it fail.