Is there a reason why stdlib functions never docum...
# stdlib
f
Is there a reason why stdlib functions never document the possible exceptions that could be thrown? Maybe a multiplatform thing? I'm looking at https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.io/java.io.-reader/read-text.html and have no clue what to expect on JVM. 🤔
9
e
In many places that’s an omission. File an issue.
👍 1
f
I can also directly create PRs, leads to less work overall. The only thing I'd need to know is when to use
@throws
in the Kdoc and when to use the actual
@Throws
annotation. Are there any rules for that?
e
Cc @ilya.gorbunov
i
If you want to document exceptions, definitely use
@throws
kdoc tag.
Throws
annotation is for Java interop and adding an exception to a method that didn't have it before is generally speaking a breaking change.
f
It sure is in Java, thanks. 👍