). I have an exception in iOS target:
Function doesn’t have or inherit @Throws annotation and thus exception isn’t propagated from Kotlin to Objective-C/Swift as NSError.It is considered unexpected and unhandled instead. Program will be terminated.Uncaught Kotlin exception: kotlin.UninitializedPropertyAccessException: lateinit property innerFactory has not been initialized
______________
Am I right that I should add @Throws annotations to all my methods in kotlin shared class? If yes, what exception class should I pass inside @Throws annotation. Thank you
o
okarm
07/25/2021, 7:17 AM
No. Fix the uninitialized lateinit instead.
💪 1
s
Sergei Popyvanov
07/27/2021, 6:12 AM
Thanks for the help. I was helped by adding @Throws annotations for methods in Kotlin classes.