Thread
#multiplatform
    Sergei Popyvanov

    Sergei Popyvanov

    1 year ago
    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

    okarm

    1 year ago
    No. Fix the uninitialized lateinit instead.
    Sergei Popyvanov

    Sergei Popyvanov

    1 year ago
    Thanks for the help. I was helped by adding @Throws annotations for methods in Kotlin classes.