Skip to content

Commit

Permalink
improve error message
Browse files Browse the repository at this point in the history
  • Loading branch information
hannojg committed Oct 16, 2024
1 parent 2ac4598 commit b0c8500
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions package/src/NativeWorklets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,11 @@ try {
throw new ModuleNotFoundError(e);
}

const installResult = module.install();
if (typeof installResult === "string") {
throw new Error(installResult);
const errorMessage = module.install();
if (errorMessage != null) {
throw new Error(
`Failed to install react-native-worklets-core: ${errorMessage}`
);
}

/**
Expand Down

0 comments on commit b0c8500

Please # to comment.