shouldThrowExactly

Verify that expr throws the templated Exception class. This only succeeds if the expression throws an exception of the exact type of the template parameter.

void
shouldThrowExactly
(
T : Throwable = Exception
E
)
(
lazy E expr
,
in string file = __FILE__
,
in size_t line = __LINE__
)

Throws

UnitTestException on failure (when expr does not throw the expected exception)

Meta