Daniel Gibson
>    enforce(foo, new BlaException("bad!"));

One use of enforce is something more like this:

auto fp = enforce(fopen("my file", "r"), "cant open file");

Which replaces:

auto fp = fopen("my file", "r");
if(fp is null) throw new Exception("cant open file");

Reply via email to