typegraph/scripts/generic/assert.gml

14 lines
313 B
Plaintext

///assert(expr, msg)
/**
* assert :: Boolean -> a[a->String] -> ()
*
* Asserts an expression is true. If not, the program halts with the given message.
*
* @param expr the expression to test
* @param msg the message shown if the assertion fails
*/
if (!argument0)
show_error(string(argument1), true);