is `@Throws` annotation worth anything in practise...
# announcements
u
is
@Throws
annotation worth anything in practise?
d
for interop with java, if you want to signify checked exception when calling code from java
u
oh, didnt know that, thanks
j
it's required for interface methods backed by java.lang.reflect.Proxy to throw checked exceptions even if the consumer is in Kotlin
k
If you write a Kotlin interface that a checked exception to be thrown by one of its abstract methods, and then a Java consumer implements that interface, they can't throw the exception unless you add
@Throws
(because their override of that method can't add
throws
to its header)