assert

void assert(bool condition, escaped string message = sourceof(condition), escaped string sourcefile = caller(sourcefile), uint sourceline = caller(sourceline), thrown Assertion* assertion)

Throws an Assertion when a condition is false.

Example

assert(count == 3);

Symbol

camp_assert

Parameters

bool
condition

The condition that must be true.

escaped string
message = sourceof(condition)

Failure message. By default, this is the source text of condition.

escaped string
sourcefile = caller(sourcefile)

Source file reported for the failure. By default, this is supplied by the caller.

uint
sourceline = caller(sourceline)

One-based source line reported for the failure. By default, this is supplied by the caller.

thrown Assertion*
assertion

Thrown assertion channel.

Generated with campc v0.6.0-preview.1+4dde68eca4014e9b19e7d7ad0fdae6b2036be640.