react-native-exception-handler icon indicating copy to clipboard operation
react-native-exception-handler copied to clipboard

warning and error is not fatal ?

Open ibra4 opened this issue 3 years ago • 0 comments
trafficstars

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?

ibra4 avatar Dec 02 '21 17:12 ibra4