vibe.d beta banner
get vibe.d
0.10.1

Asynchronous I/O that doesn’t get in your way, written in D

Function enforcep

Throws an exception if the condition evaluates to false.

void enforcep (
  bool cond,
  lazy string text,
  in const(Location) loc
) @safe;

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:

Throws

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

Authors
Copyright
License