err, i just realized, if my kotlin code isn’t mean...
# getting-started
l
err, i just realized, if my kotlin code isn’t meant to be called from java, i don’t need to use the @throws annotation in my class declaration, right ?
c
correct
l
pfew, it will be so much more readable ! thx !
👍 1
m
I think having it can still be useful documentation. If you expected it to be handled then document it. If it cannot be handled then don’t (whether you are using it from Java or not).
l
well this one cannot be handled but i’ll keep it in mind. thank you.
j
The
@throws
annotation is really meant to tell the JVM which checked exceptions the method can throw, and might not be available when compiling to other platforms. If you want to document what your method can throw, use the `@throws class, @exception class` documentation tags, they are platform-agnostic.
👍 1