Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not suppress IllegalArgumentExceptions during TurboModule creation #41509

Closed
wants to merge 1 commit into from

Conversation

javache
Copy link
Member

@javache javache commented Nov 16, 2023

Summary:
We currently ignore IllegalArgumentException being thrown from TurboModule getters, as it was deemed acceptable to use that to signal a Package didn't have that module. This however can mask legitimate errors thrown during a TurboModule constructor.

TurboReactPackage#getModule is already marked as allowing nullable returns, so let's leave the use of exceptions for exceptional scenarios.

Changelog: [Android][Changed] Use null to signal a missing TurboModule instead of IllegalArgumentException.

Differential Revision: D51395165

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Facebook Partner: Facebook Partner labels Nov 16, 2023
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D51395165

@analysis-bot
Copy link

analysis-bot commented Nov 16, 2023

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 17,645,690 -6
android hermes armeabi-v7a n/a --
android hermes x86 n/a --
android hermes x86_64 n/a --
android jsc arm64-v8a 21,033,710 -8
android jsc armeabi-v7a n/a --
android jsc x86 n/a --
android jsc x86_64 n/a --

Base commit: fa89dd6
Branch: main

javache added a commit to javache/react-native that referenced this pull request Nov 16, 2023
…facebook#41509)

Summary:

We currently ignore `IllegalArgumentException` being thrown from TurboModule getters, as it was deemed acceptable to use that to signal a Package didn't have that module. This however can mask legitimate errors thrown during a TurboModule constructor.

TurboReactPackage#getModule is already marked as allowing nullable returns, so let's leave the use of exceptions for exceptional scenarios.

Changelog: [Android][Changed] Use null to signal a missing TurboModule instead of IllegalArgumentException.

Differential Revision: D51395165
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D51395165

javache added a commit to javache/react-native that referenced this pull request Nov 16, 2023
…facebook#41509)

Summary:

We currently ignore `IllegalArgumentException` being thrown from TurboModule getters, as it was deemed acceptable to use that to signal a Package didn't have that module. This however can mask legitimate errors thrown during a TurboModule constructor.

TurboReactPackage#getModule is already marked as allowing nullable returns, so let's leave the use of exceptions for exceptional scenarios.

Changelog: [Android][Changed] Use null to signal a missing TurboModule instead of IllegalArgumentException.

Reviewed By: RSNara

Differential Revision: D51395165
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D51395165

javache added a commit to javache/react-native that referenced this pull request Nov 16, 2023
…facebook#41509)

Summary:

We currently ignore `IllegalArgumentException` being thrown from TurboModule getters, as it was deemed acceptable to use that to signal a Package didn't have that module. This however can mask legitimate errors thrown during a TurboModule constructor.

TurboReactPackage#getModule is already marked as allowing nullable returns, so let's leave the use of exceptions for exceptional scenarios.

Changelog: [Android][Changed] Use null to signal a missing TurboModule instead of IllegalArgumentException.

Reviewed By: RSNara

Differential Revision: D51395165
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D51395165

javache added a commit to javache/react-native that referenced this pull request Nov 16, 2023
…facebook#41509)

Summary:

We currently ignore `IllegalArgumentException` being thrown from TurboModule getters, as it was deemed acceptable to use that to signal a Package didn't have that module. This however can mask legitimate errors thrown during a TurboModule constructor.

TurboReactPackage#getModule is already marked as allowing nullable returns, so let's leave the use of exceptions for exceptional scenarios.

Changelog: [Android][Changed] Use null to signal a missing TurboModule instead of IllegalArgumentException.

Reviewed By: RSNara

Differential Revision: D51395165
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D51395165

1 similar comment
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D51395165

javache added a commit to javache/react-native that referenced this pull request Nov 20, 2023
…facebook#41509)

Summary:

We currently ignore `IllegalArgumentException` being thrown from TurboModule getters, as it was deemed acceptable to use that to signal a Package didn't have that module. This however can mask legitimate errors thrown during a TurboModule constructor.

TurboReactPackage#getModule is already marked as allowing nullable returns, so let's leave the use of exceptions for exceptional scenarios.

Changelog: [Android][Changed] Use null to signal a missing TurboModule instead of IllegalArgumentException.

Reviewed By: RSNara

Differential Revision: D51395165
javache added a commit to javache/react-native that referenced this pull request Nov 20, 2023
…facebook#41509)

Summary:

We currently ignore `IllegalArgumentException` being thrown from TurboModule getters, as it was deemed acceptable to use that to signal a Package didn't have that module. This however can mask legitimate errors thrown during a TurboModule constructor.

TurboReactPackage#getModule is already marked as allowing nullable returns, so let's leave the use of exceptions for exceptional scenarios.

Changelog: [Android][Changed] Use null to signal a missing TurboModule instead of IllegalArgumentException.

Reviewed By: RSNara

Differential Revision: D51395165
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D51395165

javache added a commit to javache/react-native that referenced this pull request Nov 20, 2023
…facebook#41509)

Summary:

We currently ignore `IllegalArgumentException` being thrown from TurboModule getters, as it was deemed acceptable to use that to signal a Package didn't have that module. This however can mask legitimate errors thrown during a TurboModule constructor.

TurboReactPackage#getModule is already marked as allowing nullable returns, so let's leave the use of exceptions for exceptional scenarios.

Changelog: [Android][Changed] Use null to signal a missing TurboModule instead of IllegalArgumentException.

Reviewed By: RSNara

Differential Revision: D51395165
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D51395165

javache added a commit to javache/react-native that referenced this pull request Nov 20, 2023
…facebook#41509)

Summary:

We currently ignore `IllegalArgumentException` being thrown from TurboModule getters, as it was deemed acceptable to use that to signal a Package didn't have that module. This however can mask legitimate errors thrown during a TurboModule constructor.

TurboReactPackage#getModule is already marked as allowing nullable returns, so let's leave the use of exceptions for exceptional scenarios.

Changelog: [Android][Changed] Use null to signal a missing TurboModule instead of IllegalArgumentException.

Reviewed By: RSNara

Differential Revision: D51395165
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D51395165

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D51395165

javache added a commit to javache/react-native that referenced this pull request Nov 20, 2023
…facebook#41509)

Summary:

We currently ignore `IllegalArgumentException` being thrown from TurboModule getters, as it was deemed acceptable to use that to signal a Package didn't have that module. This however can mask legitimate errors thrown during a TurboModule constructor.

TurboReactPackage#getModule is already marked as allowing nullable returns, so let's leave the use of exceptions for exceptional scenarios.

Changelog: [Android][Changed] Use null to signal a missing TurboModule instead of IllegalArgumentException.

Reviewed By: RSNara

Differential Revision: D51395165
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D51395165

javache added a commit to javache/react-native that referenced this pull request Nov 20, 2023
…facebook#41509)

Summary:

We currently ignore `IllegalArgumentException` being thrown from TurboModule getters, as it was deemed acceptable to use that to signal a Package didn't have that module. This however can mask legitimate errors thrown during a TurboModule constructor.

TurboReactPackage#getModule is already marked as allowing nullable returns, so let's leave the use of exceptions for exceptional scenarios.

Changelog: [Android][Changed] Use null to signal a missing TurboModule instead of IllegalArgumentException.

Reviewed By: RSNara

Differential Revision: D51395165
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D51395165

javache added a commit to javache/react-native that referenced this pull request Nov 20, 2023
…facebook#41509)

Summary:

We currently ignore `IllegalArgumentException` being thrown from TurboModule getters, as it was deemed acceptable to use that to signal a Package didn't have that module. This however can mask legitimate errors thrown during a TurboModule constructor.

TurboReactPackage#getModule is already marked as allowing nullable returns, so let's leave the use of exceptions for exceptional scenarios.

Changelog: [Android][Changed] Use null to signal a missing TurboModule instead of IllegalArgumentException.

Reviewed By: RSNara

Differential Revision: D51395165
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D51395165

javache added a commit to javache/react-native that referenced this pull request Nov 20, 2023
…facebook#41509)

Summary:

We currently ignore `IllegalArgumentException` being thrown from TurboModule getters, as it was deemed acceptable to use that to signal a Package didn't have that module. This however can mask legitimate errors thrown during a TurboModule constructor.

TurboReactPackage#getModule is already marked as allowing nullable returns, so let's leave the use of exceptions for exceptional scenarios.

Changelog: [Android][Changed] Use null to signal a missing TurboModule instead of IllegalArgumentException.

Reviewed By: RSNara

Differential Revision: D51395165
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D51395165

javache added a commit to javache/react-native that referenced this pull request Nov 20, 2023
…facebook#41509)

Summary:

We currently ignore `IllegalArgumentException` being thrown from TurboModule getters, as it was deemed acceptable to use that to signal a Package didn't have that module. This however can mask legitimate errors thrown during a TurboModule constructor.

TurboReactPackage#getModule is already marked as allowing nullable returns, so let's leave the use of exceptions for exceptional scenarios.

Changelog: [Android][Changed] Use null to signal a missing TurboModule instead of IllegalArgumentException.

Reviewed By: RSNara

Differential Revision: D51395165
…facebook#41509)

Summary:

We currently ignore `IllegalArgumentException` being thrown from TurboModule getters, as it was deemed acceptable to use that to signal a Package didn't have that module. This however can mask legitimate errors thrown during a TurboModule constructor.

TurboReactPackage#getModule is already marked as allowing nullable returns, so let's leave the use of exceptions for exceptional scenarios.

Changelog: [Android][Changed] Use null to signal a missing TurboModule instead of IllegalArgumentException.

Reviewed By: RSNara

Differential Revision: D51395165
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D51395165

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D51395165

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Nov 20, 2023
@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 228193d.

@javache javache deleted the export-D51395165 branch November 20, 2023 21:42
Othinn pushed a commit to Othinn/react-native that referenced this pull request Jan 9, 2024
…facebook#41509)

Summary:
Pull Request resolved: facebook#41509

We currently ignore `IllegalArgumentException` being thrown from TurboModule getters, as it was deemed acceptable to use that to signal a Package didn't have that module. This however can mask legitimate errors thrown during a TurboModule constructor.

TurboReactPackage#getModule is already marked as allowing nullable returns, so let's leave the use of exceptions for exceptional scenarios.

Changelog: [Android][Changed] Use null to signal a missing TurboModule instead of IllegalArgumentException.

Reviewed By: RSNara

Differential Revision: D51395165

fbshipit-source-id: 1eea1db6c7e3313a36d24e7837b36a3d0fccc718
javache added a commit to javache/react-native that referenced this pull request Feb 22, 2024
…gerDelegate

Summary:
Now that 0.74 has been cut, we can drop this warning and let the exception bubble up.

In facebook#41509 we stopped masking this.

Changelog: [Android][Changed] Throwing IllegalArgumentException from ReactPackage is no longer suppressed

Reviewed By: cortinico, cipolleschi

Differential Revision: D54068429
javache added a commit to javache/react-native that referenced this pull request Feb 22, 2024
…gerDelegate (facebook#43152)

Summary:

Now that 0.74 has been cut, we can drop this warning and let the exception bubble up.

In facebook#41509 we stopped masking this.

Changelog: [Android][Changed] Throwing IllegalArgumentException from ReactPackage is no longer suppressed

Reviewed By: cortinico, cipolleschi

Differential Revision: D54068429
facebook-github-bot pushed a commit that referenced this pull request Feb 22, 2024
…gerDelegate (#43152)

Summary:
Pull Request resolved: #43152

Now that 0.74 has been cut, we can drop this warning and let the exception bubble up.

In #41509 we stopped masking this.

Changelog: [Android][Changed] Throwing IllegalArgumentException from ReactPackage is no longer suppressed

Reviewed By: cortinico, cipolleschi

Differential Revision: D54068429

fbshipit-source-id: c2f780ccfefabf2334c94b632bca93242af86008
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. p: Facebook Partner: Facebook Partner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants