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

warning and error is not fatal ? #156

Open
ibra4 opened this issue Dec 2, 2021 · 0 comments
Open

warning and error is not fatal ? #156

ibra4 opened this issue Dec 2, 2021 · 0 comments

Comments

@ibra4
Copy link

ibra4 commented Dec 2, 2021

Im using this code in my app.

const errorHandler = async (error, isFatal) => {
  console.log(error, isFatal)
  sendCrashToLogger()
  if (isFatal) {
    RNRestart.Restart()
  }
}

setNativeExceptionHandler(errorHandler);
setJSExceptionHandler(errorHandler, true);
  • "ReferenceError: Can't find variable: useForm This error is located at" -> isFatal for this error is false
  • "Warning: Can't perform a React state update on an unmounted component" -> isFatal for this warning is false

the first error breaks the application while the second not.

Is there any way to determine whether the error breaks the app or not?

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

No branches or pull requests

1 participant