Skip to content

Commit

Permalink
Set ErrorUtils.setGlobalHandler
Browse files Browse the repository at this point in the history
To debug #865
  • Loading branch information
nop33 committed Oct 16, 2024
1 parent b293c64 commit c9fddc7
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions apps/mobile-wallet/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@ Sentry.init({
dsn: 'https://d369e561c12a0bbbbe1ba386854363ff@o4508131914874880.ingest.de.sentry.io/4508131917430864'
})

const defaultErrorHandler = ErrorUtils.getGlobalHandler()

ErrorUtils.setGlobalHandler((error, isFatal) => {
console.log('Global JS Error: ', error, isFatal)
Sentry.captureException(error, { data: { isFatal } })
defaultErrorHandler(error, isFatal)
})

import App from '~/App'

registerRootComponent(App)

0 comments on commit c9fddc7

Please sign in to comment.