Hello, very stupid question, but I caught my self that I don’t understand why we must write it in that way. Could you help me to figure out.
@available(iOS 13, macOS 10.15, watchOS 6, tvOS 13, *)
func getSites() async throws -> shared.Result<Foundation.NSArray> {
return try await SwiftCoroutineDispatcher.dispatch {
shared.__SkieSuspendWrappersKt.Skie_Suspend__47__getSites(dispatchReceiver: self, suspendHandler: $0)
}
}
I have as suspend function in Kotlin that just returns Result<List> does not return any errors, but function generated by skie states
async throws
, does it assume that func might return
CancellationException
and that is why I have to write it in that way?
let result = try? await usecase.downloadSites(dataRef: dataRef, fields: fields)
Ty in advance!