Stephen Gazzard
04/29/2021, 7:59 PMException doesn't match @Throws-specified class list and thus 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: com.apollographql.apollo.ApolloNetworkException: Failed to execute GraphQL http network request
Seems a built in part of the KMM framework is if your Kotlin function doesn’t mark @Throws() with the exception, KMM crashes your app. There’s no compile time safety enforcing that only exceptions annotated in @Throws, so it is possible that an exception is missed that later ends up crashing your iOS application. This is undesired behaviour, as if we miss documenting an exception, it can crash in the wild. In iOS, we typically just show an error message when an unexpected error arises. Is there a way to ensure that Kotlin never crashes us in this case?mbonnin
04/29/2021, 11:06 PMStephen Gazzard
04/30/2021, 2:37 PM