vibe.d beta banner
get vibe.d
0.7.30

Function enforcep

Throws an exception if the condition evaluates to false.

This function will generate a proper error message including file and line number when called at compile time. An assertion is used in this case instead of an exception:

Prototype

void enforcep(
  bool cond,
  lazy string text,
  ref const(Location) loc
);

Throws

Throws a DietParserException when called with a false condition at run time.

Authors
Copyright
License