ribesg
05/23/2019, 12:43 PMkotlinx.cinterop.CPointer<kotlinx.cinterop.ObjCObjectVar<platform.Foundation.NSError?>>?
to an ObjC function, is it how you do it?
var error: NSError? = null
val errorPtr = ObjCObjectVar<NSError?>(error.objcPtr()).ptr
ribesg
05/23/2019, 12:47 PMribesg
05/23/2019, 12:51 PMalloc
but I still wondersvyatoslav.scherbina
05/23/2019, 2:01 PMlet’s say that works.I’m afraid it doesn’t.
Is there still no built-in way to convert from NSError to Throwable (and vice-versa) ?Does anything prevent you from throwing an exception with
NSError
inside?
Is what I did equivalent?No.
ribesg
05/23/2019, 2:22 PMthrow Error("...: ${nsError.debugDescription}")
svyatoslav.scherbina
05/23/2019, 2:29 PMNSError
doesn’t have a stacktrace.Kris Wong
05/23/2019, 2:45 PM