Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@throws tags do not create clickable links #6626

Closed
scabug opened this issue Nov 7, 2012 · 4 comments
Closed

@throws tags do not create clickable links #6626

scabug opened this issue Nov 7, 2012 · 4 comments
Assignees
Milestone

Comments

@scabug
Copy link

scabug commented Nov 7, 2012

@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?

@scabug
Copy link
Author

scabug commented Nov 7, 2012

Imported From: https://issues.scala-lang.org/browse/SI-6626?orig=1
Reporter: Mike Allen (mja)
Affected Versions: 2.9.2

@scabug
Copy link
Author

scabug commented Nov 7, 2012

@soc said:
I think this should be fixed. I was working on throws-related stuff recently, I'll try to have a look at it.

@scabug
Copy link
Author

scabug commented May 20, 2013

@JamesIry said:
2.10.2 is about to be cut. Kicking down the road and un-assigning to foster work stealing.

@scabug
Copy link
Author

scabug commented Nov 4, 2014

@gourlaysama said:
scala/scala#4089

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants