a7ul / react-native-exception-handler

A react native module that lets you to register a global error handler that can capture fatal/non fatal uncaught exceptions.
MIT License
1.58k stars 133 forks source link

warning and error is not fatal ? #156

Open ibra4 opened 2 years ago

ibra4 commented 2 years ago

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);

the first error breaks the application while the second not.

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