Skip to content
This repository has been archived by the owner on Oct 23, 2023. It is now read-only.

Match any exception type for Tensor indexing API #118

Closed
wants to merge 1 commit into from

Conversation

raedle
Copy link
Contributor

@raedle raedle commented Sep 6, 2022

Summary:
The tensor indexing API relies on exceptions when a prop name cannot be converted to an int via std::stoi.

After upgrading to Expo 46, it causes a runtime error (std::exception&), which doesn't get caught with the current catch. The change broadens the catch to match any exception (catch (...)), which fixes the issue.

The reasons are not clear, but it's assumed to be a compiler flag change. We continue to investigate, but in the meantime, this change unblock anyone who is facing the same issue

Reviewed By: justinhaaheim

Differential Revision: D39148492

Summary:
The tensor indexing API relies on exceptions when a prop name cannot be converted to an int via `std::stoi`.

After upgrading to Expo 46, it causes a runtime error (`std::exception&`), which doesn't get caught with the current `catch`. The change broadens the `catch` to match any exception (`catch (...)`), which fixes the issue.

The reasons are not clear, but it's assumed to be a compiler flag change. We continue to investigate, but in the meantime, this change unblock anyone who is facing the same issue

Reviewed By: justinhaaheim

Differential Revision: D39148492

fbshipit-source-id: 766d716d7991415110262d600d94268441e858af
@facebook-github-bot facebook-github-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 Sep 6, 2022
@vercel
Copy link

vercel bot commented Sep 6, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Updated
playtorch ⬜️ Ignored (Inspect) Sep 6, 2022 at 10:57PM (UTC)

@facebook-github-bot
Copy link
Contributor

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants