Skip to content

Commit 7d6d0a7

Browse files
RSNarafacebook-github-bot
authored andcommitted
native modules: Show message in redundant rejection redbox (#53152)
Summary: Pull Request resolved: #53152 When a redundant reject is called, show the rejection message in the redbox. This can help us pin down the error we need to elminiate in production. Changelog: [Internal] Reviewed By: sanjay-io Differential Revision: D79837541 fbshipit-source-id: 879b5dc42980867051cfab6ccb575304a4a9c4c6
1 parent dc87995 commit 7d6d0a7

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

  • packages/react-native/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon

packages/react-native/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTTurboModule.mm

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -338,12 +338,18 @@ id convertJSIValueToObjCObject(
338338
}
339339

340340
if (alreadyResolved) {
341-
RCTLogError(@"%s: Tried to reject a promise after it's already been resolved.", moduleMethod.c_str());
341+
RCTLogError(
342+
@"%s: Tried to reject a promise after it's already been resolved. Message: %s",
343+
moduleMethod.c_str(),
344+
message.UTF8String);
342345
return;
343346
}
344347

345348
if (alreadyRejected) {
346-
RCTLogError(@"%s: Tried to reject a promise more than once.", moduleMethod.c_str());
349+
RCTLogError(
350+
@"%s: Tried to reject a promise more than once. Message: %s",
351+
moduleMethod.c_str(),
352+
message.UTF8String);
347353
return;
348354
}
349355

0 commit comments

Comments
 (0)