https://kotlinlang.org logo
#dokka
Title
# dokka
a

alfdev

10/24/2023, 9:17 AM
Hi all, I'm using dokka to generate the javadoc for a kotlin library but the @throws are not rendered in the html, any idea? Thanks
1
i

Ignat Beresnev

10/26/2023, 9:11 AM
Hi! Which version of Dokka are you using? I think this bug was fixed fairly recently
a

alfdev

10/26/2023, 9:11 AM
Hi, 1.9.10
i

Ignat Beresnev

10/26/2023, 9:12 AM
Hm, could you give a reproducer example or a screenshot of what you're seeing in code and in html? Might be a bug
a

alfdev

10/26/2023, 9:23 AM
You mean the gradle configuration?
Because in the output html I don't see the Throws section, simply 🙂
/*....
* @throws [IllegalArgumentException] if the parameters passed are not valid. */
@Throws(IllegalArgumentException::class)
fun build(): ChallengeResponse {
👍 1
i

Ignat Beresnev

10/26/2023, 9:25 AM
Preferably just the piece of Kotlin source code in which you have the throws tag on a declaration, and a screenshot of that same declaration in the HTML output
a

alfdev

10/26/2023, 9:26 AM
ok
i

Ignat Beresnev

10/26/2023, 9:27 AM
(I understand it may sound like a weird request, but we have unit tests that cover basic and obvious scenarios for sure, so either this bug is a corner case or it's not used correctly / the expectations are off)
a

alfdev

10/26/2023, 9:29 AM
don't worry 🙂
image.png
Instead, if I use the html as output format it works
i

Ignat Beresnev

10/26/2023, 9:38 AM
Oh, it's the Javadoc format, I thought we were talking about Dokka's own HTML format (which can also be put in javadoc.jar), sorry. Yeah, the throws tag is simply not supported in the Javadoc format, but there's no issue for it :( However, it shouldn't be difficult to fix though. Do you want to submit an issue to Dokka's repo or even take a shot at fixing it?
a

alfdev

10/26/2023, 9:42 AM
Oh so it's not supported. In the meanwhile I switched to the dokka's own html format so I can use it.
👍 1
Thank you so much Ignat
🦜 1
thank you color 1
i

Ignat Beresnev

10/26/2023, 10:25 AM
Thank you for the report! :)
2 Views