assert( mustExcept!Exception( { throw new Exception("test"); } ) ); assert( !mustExcept!Exception( { throw new Throwable("test"); } ) ); assert( !mustExcept!Exception( { auto a = 4; } ) );
See Implementation