Lines Matching refs:enforce
19 $(LREF enforce)
125 assertNotThrown!StringException(enforce!StringException(true, "Error!"));
128 assertNotThrown(enforce!StringException(true, "Error!"));
131 enforce!StringException(false, "Error!"))) ==
139 enforce!StringException(false, ""), "Error!")) ==
143 enforce!StringException(false, ""))) ==
147 enforce!StringException(false, ""), "")) ==
268 assertThrown!StringException(enforce!StringException(false, "Error!"));
271 assertThrown(enforce!StringException(false, "Error!"));
274 enforce!StringException(true, "Error!"))) ==
370 $(D enforce) is used to throw exceptions and is therefore intended to
373 $(D enforce) inside of contracts (i.e. inside of $(D in) and $(D out)
379 auto f = enforce(fopen("data.txt"));
381 enforce(line.length, "Expected a non-empty line.");
384 T enforce(E : Throwable = Exception, T)(T value, lazy const(char)[] msg = null,
600 This is legacy name, it is recommended to use $(D enforce!E) instead. in catch()
1585 assert(enforce("x".to!int() < 1).to!string()
1691 assert(enforce("x".to!int() < 1).to!string()
2218 the exception was thrown from; 2$(RPAREN) be usable with $(LREF enforce) which