From 925e7801aafba10775f7c2384eb8f8833bc6da8b Mon Sep 17 00:00:00 2001 From: Svyatoslav Scherbina Date: Thu, 3 Feb 2022 14:31:00 +0300 Subject: [PATCH] Native: improve message when Obj-C block can't be converted to Any --- kotlin-native/runtime/src/main/cpp/ObjCExport.mm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kotlin-native/runtime/src/main/cpp/ObjCExport.mm b/kotlin-native/runtime/src/main/cpp/ObjCExport.mm index 2dce12a0239..83d69ebd449 100644 --- a/kotlin-native/runtime/src/main/cpp/ObjCExport.mm +++ b/kotlin-native/runtime/src/main/cpp/ObjCExport.mm @@ -494,14 +494,14 @@ static OBJ_GETTER(blockToKotlinImp, id block, SEL cmd) { const char* argEncoding = [signature getArgumentTypeAtIndex:i]; if (argEncoding[0] != '@') { [NSException raise:NSGenericException - format:@"Blocks with non-reference-typed arguments aren't supported (%s)", argEncoding]; + format:@"Converting Obj-C blocks with non-reference-typed arguments to kotlin.Any is not supported (%s)", argEncoding]; } } const char* returnTypeEncoding = signature.methodReturnType; if (returnTypeEncoding[0] != '@') { [NSException raise:NSGenericException - format:@"Blocks with non-reference-typed return value aren't supported (%s)", returnTypeEncoding]; + format:@"Converting Obj-C blocks with non-reference-typed return value to kotlin.Any is not supported (%s)", returnTypeEncoding]; } auto converter = parameterCount < Kotlin_ObjCExport_blockToFunctionConverters_size