Vsevolod Ganin06/27/2022, 1:09 PM
in Kotlin while calling
try ... catch ...
method implemented in swift/objc? I saw relatively new
but afaik it only works for cinteroped libraries with special flag
Sam06/28/2022, 1:46 PM
Vsevolod Ganin06/28/2022, 1:57 PM
An error pointer is passed into the function and if after calling the function, it has a value, then the function has generated an error.I’m getting the idea that Kotlin-ObjC interop layer could do this implicitly and rethrow as Kotlin exception if the error pointer has the value. Please correct me if I’m getting a wrong impression
. For instance, you can take XCTest framework. It throws
when assertion fails as the means to stop execution of current test. If your test is written partly in Kotlin and uses XCTest assertions then the whole process just aborts instead of marking test failure and let other test execute.
Sam06/28/2022, 5:46 PM