More informative error messages for `test_throws`
Merge pull request #9455 from kshramt/informative_test_throws

More informative error messages for `test_throws`