An overload of enforceEx which allows constructing the exception with the arguments its ctor supports. The ctor's last parameters must be a string (file) and size_t (line).
static class Exc : Exception { this(int x, string file, int line) { super("", file, line); this.x = x; } int x; } try { enforceEx!Exc(false, 1); assert(0); } catch (Exc ex) { assert(ex.x == 1); }
See Implementation
An overload of enforceEx which allows constructing the exception with the arguments its ctor supports. The ctor's last parameters must be a string (file) and size_t (line).