-
Notifications
You must be signed in to change notification settings - Fork 28
Open
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation
Description
private fun createLocalWallet(
name: String,
createSwiftWallet: (CPointer<ObjCObjectVar<NSError?>>) -> SwiftWallet
): LocalWallet {
val (result, error) = memScoped {
val p = alloc<ObjCObjectVar<NSError?>>()
val result: SwiftWallet? = runCatching {
createSwiftWallet(p.ptr)
}.getOrNull()
result to p.value
}
if (error != null) throw error.toException()
else return LocalWallet(name, result!!)
}Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation