Currently only @throws(classOf[Exception]) is supported.
@throws[Exception] improves on the code before:
- more concise and readable
- source compatible (didn't check it yet)
- actually enforces that we are throwing a Throwable, and not a String
Care is taken that the addition doesn't break anything. Because the serialization stays the same, it won't even change anything on the binary compat front.
See https://groups.google.com/d/msg/scala-internals/EyE9DJ0EbUY/pkZ9qkVP72IJ for the discussion.