As far as I understand, it is used to generate a throws
clause for Java applications to see.
Is there any benefit in using it if one doesn’t support Java client code? I have been using it for about two years now I think, because I noticed it in Scala sources. So far, I see only disadvantages compared to the @throws
tag in Scaladoc:
- Scaladocs can be folded in the IDE while annotations not, meaning even small methods have a large on screen footprint.
- Scaladocs supports formatting, annotations do not.
- Scaladoc can use
@define
macros which allow generating more meaningful phrasing when the method is inherited from a very generic mix in. - Scaladocs can be inherited.
If we are using a code structure, I would like at least to have @throws
being inheritable - possibly with an additional parameter, unless an overriding method already defines some @throws
annotations or @throws[Nothing]
.
I am seriously thinking of migrating back to the use of the Scaladoc tag unless someone enlightens me of why this is not preferred.