Skip to content

Throw instead of returning undefined when requireNodeAddon fails to load #50

Description

@kraenhansen

We're currently returning undefined when a module fails to load: https://github.com/callstackincubator/react-native-node-api-modules/blob/8a76cf8e39f3ab1cbf0e68e0ff7fb00d3b355b31/packages/react-native-node-api-modules/cpp/CxxNodeApiHostModule.cpp#L37

I feels like an unrecoverable state to me, which might be easier to discover and resolve if we threw an error with a proper error message instead.

Activity

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

Metadata

Metadata

Assignees

Labels

C++Host 🏡Our `react-native-node-api-modules` package

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions