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
This commit is contained in:
Ramanpreet Nara
2022-04-26 16:30:29 -07:00
committed by Facebook GitHub Bot
parent 7f3cc256b5
commit b4ebc98e51
@@ -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,