From b4ebc98e51045dce52676b1685a3ac76eeb93313 Mon Sep 17 00:00:00 2001 From: Ramanpreet Nara Date: Tue, 26 Apr 2022 16:30:29 -0700 Subject: [PATCH] Log error when TMMDelegate getModuleForClass returns nil Summary: Ideally, the application should always be able to create the TurboModule object given an ObjC class. This debugging information will help track down these classes of issues, when they surface. Changelog: [Internal] Reviewed By: fkgozali Differential Revision: D35945399 fbshipit-source-id: 1621a4a64bc8fb0411123fb1470bbb52ccf0edcf --- .../nativemodule/core/platform/ios/RCTTurboModuleManager.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ReactCommon/react/nativemodule/core/platform/ios/RCTTurboModuleManager.mm b/ReactCommon/react/nativemodule/core/platform/ios/RCTTurboModuleManager.mm index 5c24790a1aa..6dfc6cb249c 100644 --- a/ReactCommon/react/nativemodule/core/platform/ios/RCTTurboModuleManager.mm +++ b/ReactCommon/react/nativemodule/core/platform/ios/RCTTurboModuleManager.mm @@ -527,7 +527,7 @@ static Class getFallbackClassFromName(const char *name) * abort TurboModule creation, and early return nil. */ if (!module) { - RCTLogWarn( + RCTLogError( @"TurboModuleManager delegate %@ returned nil TurboModule object for module with name=\"%s\" and class=%@", NSStringFromClass([_delegate class]), moduleName,