assert(cond: bool, msg: utf8) → none

Category: [control](builtinscontrol)_

Return none when cond is true, otherwise abort with msg.

ParameterTypeDescriptionRemarks
condboolThe condition that must hold.
msgutf8The error message reported when cond is false.
returnsnonenone when the assertion holds (otherwise aborts).
wcl
assert(1 + 1 == 2, "math is broken")   // verify a condition holds → none