How to use the react-native-exception-handler.setNativeExceptionHandler function in react-native-exception-handler

To help you get started, we’ve selected a few react-native-exception-handler examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github berty / berty / client / react-native / common / helpers / crash-handler.js View on Github external
)
}

if (process.env['ENVIRONMENT'] !== 'integration_test') {
  // eslint-disable-next-line
  if (!__DEV__) {
    console.error = error => exceptionHandler(error, false)
  }

  if (Platform.OS === 'ios' || Platform.OS === 'android') {
    const allowInDevMode = false
    const forceAppQuit = false
    const executeDefaultHandler = false

    setJSExceptionHandler(exceptionHandler, allowInDevMode)
    setNativeExceptionHandler(() => {}, forceAppQuit, executeDefaultHandler)
  }
}
github berty / berty / client / react-native / app / common / helpers / crash-handler.js View on Github external
)
}

if (!isIntegrationMode) {
  // eslint-disable-next-line
  if (!__DEV__) {
    console.error = error => exceptionHandler(error, false)
  }

  if (Platform.OS === 'ios' || Platform.OS === 'android') {
    const allowInDevMode = false
    const forceAppQuit = false
    const executeDefaultHandler = false

    setJSExceptionHandler(exceptionHandler, allowInDevMode)
    setNativeExceptionHandler(() => {}, forceAppQuit, executeDefaultHandler)
  }
}
github berty / berty / client / packages / common / helpers / crash-handler.js View on Github external
],
    { cancelable: false }
  )
}

if (!isIntegrationMode && Platform.OS !== 'web') {
  if (!__DEV__) {
    console.error = error => exceptionHandler(error, false)
  }

  const allowInDevMode = false
  const forceAppQuit = false
  const executeDefaultHandler = true

  setJSExceptionHandler(exceptionHandler, allowInDevMode)
  setNativeExceptionHandler(
    () =>
      Notifier.system({
        title: I18n.t('restart'),
        body: I18n.t('unexpected-error'),
      }),
    forceAppQuit,
    executeDefaultHandler
  )
}
github berty / berty / js / packages / components / error.tsx View on Github external
React.useEffect(() => {
		setJSExceptionHandler(errorHandler)
		setNativeExceptionHandler(errorHandler)
	}, [])
github mattermost / mattermost-mobile / app / utils / error_handling.js View on Github external
initializeErrorHandling = (store) => {
        this.store = store;
        initializeSentry();
        setJSExceptionHandler(this.errorHandler, false);
        setNativeExceptionHandler(this.nativeErrorHandler, false);
    }

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
Latest version published 4 years ago

Package Health Score

56 / 100
Full package analysis