Update @test_throws documentation and clarify return for @__FILE__

The @test_throws is a better attempt at #7042, with behavior verified with #7051.

The @__FILE__ documentation is to clarify issues raised in #7166.