alexfu02/14/2021, 1:39 PM
I've determined this happens because, in Kotlin, it's not required to specify if a function throws an exception. However, when targeting a native platform, if you don't specify that the function throws, those errors will be uncaught. So what I'm doing to resolve this is to add
Exception doesn't match @Throws-specified class list and thus isn't propagated from Kotlin to Objective-C/Swift as NSError
to every single API function I have. I'm wondering if there is an easier way to manage this since there's no lint type check for this (that I'm aware of), making it's easy to forget. I also feel like this may be more of a Kotlin question than a Ktor one.
Michal Klimczak02/14/2021, 2:10 PM