Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Scaladoc swallowed @throws and @note tags

Tags:

scala

scaladoc

When creating a Scala documentation I also use the @throws and @note tags like documented here (Scaladoc Wiki - Tags and Annotations).

Unfortunately I can't find these in the generated Scaladoc.

Do one have to set certain switches, consider something specific or is this a known problem?

BTW: using the scaladoc Ant task of Scala 2.9.0.1 that issues no warning too.

EDIT: BTW2 and to clarify: I do not mean the @throws annotation

@throws(classOf[RuntimeException])
def dispatch: Nothing = throw new RuntimeException

which is documented in the annotations section of this def but the @throws tag for Scaladoc like

/** @throws RuntimeException
 */
def dispatch: Nothing = throw new RuntimeException
like image 226
binuWADa Avatar asked Sep 13 '11 07:09

binuWADa


2 Answers

This is a combination of a bug and something that hasn't made it into a release yet.

@note does not work, this is a known bug, see @todo, @note and @example don't work?

@throws was only added recently, see this pull request from Simon Ochsenreither, which was merged in July 2011. This hasn't yet made it into a release, 2.9.0.1 was released in May 2011, and 2.9.1 was started in July 2011.

like image 80
Matthew Farwell Avatar answered Nov 18 '22 15:11

Matthew Farwell


I added support for @note half a year ago.

If you have a look here, it seems to work correctly: scala.util.matching.Regex

The other things is the @throws ScalaDoc tag. Actually I'm thinking about removing support for it in favor of the @throws annotation, which is supported, because I can't see any use case where one would prefer the ScalaDoc tag to the annotation.

If you have a real need please let me no, let me know!

Edit: Mhhh. Looking at scala.Array it actually looks like it is the other way around...

like image 3
soc Avatar answered Nov 18 '22 17:11

soc