Skip to content

@throws tags do not create clickable links #6626

@scabug

Description

@scabug

@throws tags do not appear to create clickable links to the named exception classes.

For example, consider this code snippet:

package dummy

/** Dodgy exception.
  *
  * Thrown if something dodgy happens.
  */

class DodgyException extends Exception ("Something dodgy happened")

/** Some dodgy object.
  */

object Dodgy {

/** Some dodgy function.
  *
  * @throws dummy.DodgyException if something dodgy happens.
  */

  def someDodgyFunction (): Unit = {
    // ...
  }
}

Will result in the following Scaladoc snippet (approximate appearance):

def someDodgyFunction(): Unit
    Some dodgy function
    Exceptions thrown   dummy.DodgyException
                        if something dodgy happens

Note the that dummy.DodgyException is not a link!

I also tried, by analogy to the @see tag, the following:

package dummy

/** Dodgy exception.
  *
  * Thrown if something dodgy happens.
  */

class DodgyException extends Exception ("Something dodgy happened")

/** Some dodgy object.
  */

object Dodgy {

/** Some dodgy function.
  *
  * @throws [[dummy.DodgyException]] if something dodgy happens.
  */

  def someDodgyFunction (): Unit = {
    // ...
  }
}

using the link syntax around the exception name. However, this produces the following (approximate)output:

def someDodgyFunction(): Unit
    Some dodgy function.
    Exceptions thrown   [[dummy.DodgyException]]
                        if something dodgy happens

In this case, note that the double square brackets are retained.

For an example in the Scala API docs, refer to: scala.Option.get.

Is this correct behavior?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions