Skip to content

native error doesn't trigger error view #1

New issue

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

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

Already on GitHub? # to your account

Open
dengue8830 opened this issue Jul 5, 2018 · 4 comments
Open

native error doesn't trigger error view #1

dengue8830 opened this issue Jul 5, 2018 · 4 comments

Comments

@dengue8830
Copy link

i followed this

    git clone https://github.com/master-atul/react-native-exception-handler-example
    yarn install
    react-native run-ios --configuration Release or react-native run-android --variant=release

but when i press cause native error i see this

image

its that ok? I thought i should see this

image

@dengue8830 dengue8830 changed the title native error doesn't trigger custom error view native error doesn't trigger error view Jul 5, 2018
@daihovey
Copy link

I think it's because the example just prints out to the console, the Alert hasn't been implemented

setNativeExceptionHandler((errorString) => {
    console.log('setNativeExceptionHandler');
});

@dengue8830
Copy link
Author

I guess I have to write a native exception handler in order to catch it and prevent default crash behavior?

@liukefu2050
Copy link

Hence if you click on Cause JS Exception Button, you should see the error been caught straight away.

In case of native exceptions . You would need to run the app in the bundled mode using:

react-native run-ios --configuration Release

For Android you can run it using:

react-native run-android --variant=release

This runs the app on simulator in release configuration.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants