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

Allow React Native Android devs to manually report exceptions to HB from native modules. #1115

Open
andreybutov opened this issue Jul 8, 2023 · 0 comments
Assignees
Labels
react-native @honeybadger-io/react-native

Comments

@andreybutov
Copy link
Collaborator

andreybutov commented Jul 8, 2023

This is a follow-up to #1050 .

The problem we have is that we cannot hook into unhandled native Android exceptions from the main thread for React Native, because the RN library itself handles exceptions on the main thread, and doesn't rethrow to allow for interception.

To make things a little better for developers, we need to add a way for them to still be able to report native Android errors to Honeybadger, even if we can't catch unhandled native exceptions automatically from the main thread.

We will add notify method(s) to the native layer of HB RN (Android only) that will allow developers to report a native Android exception directly to Honeybadger. That way, if they are implementing their own native Android modules, or are explicitly calling Android native modules from their code, they can wrap those calls in try catch blocks of their own, and then send any caught native exceptions to Honeybadger directly from native Android code.

@andreybutov andreybutov added the react-native @honeybadger-io/react-native label Jul 8, 2023
@andreybutov andreybutov self-assigned this Jul 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
react-native @honeybadger-io/react-native
Projects
None yet
Development

No branches or pull requests

1 participant