JuliaLang/julia — pull request #6475 by staticfloat (2014-04-09 00:41:25+00:00)
Title: Change @test_throws to only check for a single exception type

Rebased, and now with 100% less breakage! This version will kindly instruct you on how to fix your code:

```julia
julia> using Base.Test

julia> @test_throws a+1
WARNING: @test_throws without an exception type is deprecated
Use @test_throws a + 1 UndefVarError
in backtrace at error.jl:30

julia> @test_throws a+1 UndefVarError
```

Two things to talk about before this gets merged:

* I'd like to have backtraces, but it seems I don't know how to print them properly, since they always end with "in backtrace at error.jl:30". Also, the backtraces are almost impossible to read in the test suite. I tried to combat this by having the backtrace get taken in the macro itself, but it doesn't seem to help much.

* The `parseint()` tests [don't raise the same errors](https://github.com/JuliaLang/julia/blob/ecb1a71924fd7a3096fd12a602c58f43d807ffe7/test/strings.jl#L235-236) when you change their input types. Sometimes it's an `OverflowError`, and sometimes it's an `ErrorException`. This should probably be fixed.