Hello, I’m new in KMM (kotlin `version "1.5.10"`)....
# multiplatform
s
Hello, I’m new in KMM (kotlin
version "1.5.10"
). 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
No. Fix the uninitialized lateinit instead.
💪 1
s
Thanks for the help. I was helped by adding @Throws annotations for methods in Kotlin classes.