API:assert

__NOTOC__
assert
Issues an error when the value of its argument exp is false(i.e., nil or false)
assert (exp[, message])
== Parameters ==
=== Arguments ===
:;exp
::exp - Expression to be evaluated. Can be an a equivalency, a function, and integer, a table, etc.
:;message
::string - The message to be given if an error is thrown; when absent, it defaults to "assertion failed!"
=== Returns ===
:;argumentlist or none
::explist - When exp does not evaluate to nil or false, returns all its arguments.
== Example ==
-- If you don't have a target when this is run, it throws an error
assert(UnitName("target"), "You dont have a target!")
== Notes ==
* http://www.lua.org/manual/5.1/manual.html#pdf-assert
== Related Functions ==
* error