fixed warnings for @test_throws tests