Similar to enforce, except it can take a formatting string as the second argument.
Note: Until Issue 8687 is fixed, file and line have to be compile-time
arguments, which might create template bloat.
require(1 == 2).getExceptionMsg.assertEqual("requirement failed.");
require(1 == 2, "%s is not true").getExceptionMsg.assertEqual("%s is not true");
require(1 == 2, "%s is not true", "1 == 2").getExceptionMsg.assertEqual("1 == 2 is not true");
Similar to enforce, except it can take a formatting string as the second argument. Note: Until Issue 8687 is fixed, file and line have to be compile-time arguments, which might create template bloat.