Skip to content

Commit

Permalink
Fix for iOS displaying a RedBox for LogBox handled errors (#32641)
Browse files Browse the repository at this point in the history
Summary:
Fix for iOS displaying a RedBox for LogBox handled errors, this has been happening since RN 0.65 (in 64.2 and earlier, if it was handled by LogBox then it wouldn't trigger RedBox)

Fixes #32106

## Changelog

[iOS] [Fixed] - Stop RedBox from appearing for LogBox handled errors

Pull Request resolved: #32641

Test Plan: Manually tested. Seems to fix things (and RedBox still displays for things like 'Could not connect to development server') but I would appreciate RSNara or someone else who is more familiar with the code to confirm that the original switch was a mistake and not something deliberately changed.

Reviewed By: christophpurrer

Differential Revision: D33661481

Pulled By: cortinico

fbshipit-source-id: c9c262adb3f977ae3f13beb9575d3eaa2445f663
  • Loading branch information
liamjones authored and facebook-github-bot committed Jan 19, 2022
1 parent 3a07dcf commit 9d2df5b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion React/CoreModules/RCTExceptionsManager.mm
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ - (void)reportFatal:(NSString *)message stack:(NSArray<NSDictionary *> *)stack e
: (double)exceptionId)
{
RCTRedBox *redbox = [_moduleRegistry moduleForName:"RedBox"];
[redbox showErrorMessage:message withStack:stack errorCookie:(int)exceptionId];
[redbox updateErrorMessage:message withStack:stack errorCookie:(int)exceptionId];

if (_delegate && [_delegate respondsToSelector:@selector(updateJSExceptionWithMessage:stack:exceptionId:)]) {
[_delegate updateJSExceptionWithMessage:message stack:stack exceptionId:[NSNumber numberWithDouble:exceptionId]];
Expand Down

0 comments on commit 9d2df5b

Please sign in to comment.