Join Slack
Powered by
Is there any way to mark a function as throwing in...
# javascript
b
benleggiero
12/18/2017, 12:52 AM
Is there any way to mark a function as throwing in Kotlin/JS?
b
bashor
12/18/2017, 4:34 PM
Do you mean checked exception like in Java?
b
benleggiero
12/19/2017, 2:19 PM
Yes, so I can write a library and know, when I use it, which functions throw and which ones don’t.
b
bashor
12/19/2017, 2:35 PM
No, Kotlin doesn’t have checked exceptions
b
benleggiero
12/22/2017, 6:38 PM
Yes, I'm aware... I made a proposal to fix that but it was rejected. In the meantime I've been using the
@Throws
annotation in Kotlin/JVM, but there doesn't seem to be an analog in Kotlin/JS
3
Views
Open in Slack
Previous
Next