assert(cond: bool, msg: utf8) → none
Category: [control](builtinscontrol)_
Return none when cond is true, otherwise abort with msg.
| Parameter | Type | Description | Remarks |
|---|---|---|---|
| cond | bool | The condition that must hold. | — |
| msg | utf8 | The error message reported when cond is false. | — |
| returns | none | none when the assertion holds (otherwise aborts). | — |
wcl
assert(1 + 1 == 2, "math is broken") // verify a condition holds → none