enforceEx

private fnvoid enforceEx(E)(bool cond, lazy string msg) if (is(E : Exception))

Helper that throws the given exception type when cond is false.

Parameters

EException type to throw.
condCondition to enforce.
msgError message (lazily evaluated).

Throws

E when cond is false.