Skip to content

RN: Default reportErrorsAsExceptions w/o Global Property (#56197)#56197

Closed
yungsters wants to merge 1 commit intofacebook:mainfrom
yungsters:export-D97788692
Closed

RN: Default reportErrorsAsExceptions w/o Global Property (#56197)#56197
yungsters wants to merge 1 commit intofacebook:mainfrom
yungsters:export-D97788692

Conversation

@yungsters
Copy link
Copy Markdown
Contributor

@yungsters yungsters commented Mar 23, 2026

Summary:

Refactors ExceptionsManager so that reportErrorsAsExceptions defaults to true without setting the console.reportErrorsAsExceptions global property.

This reduces the amount of non-idiomatic code that needs to be maintained, and it also makes it clearer that the default of reportErrorsAsExceptions is true. (It already is, but now it's more obvious by reading the conditional.)

This is technically a change in behavior of a public interface, but it's very subtle and — for most if not all codebases — should not result in any change in behavior.

Changelog:
[General][Changed] - Setting reportErrorsAsExceptions to anything other than false no longer does anything. (Previously, setting it to a falsey value would be similar to setting it to false.)

Differential Revision: D97788692

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Mar 23, 2026
@meta-codesync
Copy link
Copy Markdown

meta-codesync Bot commented Mar 23, 2026

@yungsters has exported this pull request. If you are a Meta employee, you can view the originating Diff in D97788692.

…56197)

Summary:

Refactors `ExceptionsManager` so that `reportErrorsAsExceptions` defaults to `true` without setting the `console.reportErrorsAsExceptions` global property.

This reduces the amount of non-idiomatic code that needs to be maintained, and it also makes it clearer that the default of `reportErrorsAsExceptions` is `true`. (It already is, but now it's more obvious by reading the conditional.)

This is *technically* a change in behavior of a public interface, but it's very subtle and — for most if not all codebases — should not result in any change in behavior.

Changelog:
[General][Changed] - Setting `reportErrorsAsExceptions` to anything other than `false` no longer does anything. (Previously, setting it to a falsey value would be similar to setting it to `false`.)

Differential Revision: D97788692
@meta-codesync meta-codesync Bot changed the title RN: Default reportErrorsAsExceptions w/o Global Property RN: Default reportErrorsAsExceptions w/o Global Property (#56197) Mar 23, 2026
@meta-codesync meta-codesync Bot closed this in f0748a6 Mar 24, 2026
@react-native-bot
Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @yungsters in f0748a6

When will my fix make it into a release? | How to file a pick request?

@react-native-bot react-native-bot added the Merged This PR has been merged. label Mar 24, 2026
@meta-codesync
Copy link
Copy Markdown

meta-codesync Bot commented Mar 24, 2026

This pull request has been merged in f0748a6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged This PR has been merged. meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants