App crashes maybe caused by Sentry

https://github.com/expo/sentry-expo/issues/120
This commit is contained in:
Zhiyuan Zheng 2021-01-20 13:19:06 +01:00
parent a74cdf5768
commit f95462889f
No known key found for this signature in database
GPG Key ID: 078A93AB607D85E0
2 changed files with 10 additions and 8 deletions

View File

@ -6,9 +6,9 @@ const haptics = (
type: 'Success' | 'Warning' | 'Error' | 'Light' | 'Medium' | 'Heavy'
) => {
if (Platform.OS === 'android') {
Haptics.impactAsync(Haptics.ImpactFeedbackStyle['Light']).catch(error =>
Sentry.Native.captureException(error)
)
Haptics.impactAsync(Haptics.ImpactFeedbackStyle['Light']).catch(error => {
// Sentry.Native.captureException(error)
})
return
}
@ -17,15 +17,17 @@ const haptics = (
case 'Warning':
case 'Error':
Haptics.notificationAsync(Haptics.NotificationFeedbackType[type]).catch(
error => Sentry.Native.captureException(error)
error => {
// Sentry.Native.captureException(error)
}
)
break
case 'Light':
case 'Medium':
case 'Heavy':
Haptics.impactAsync(Haptics.ImpactFeedbackStyle[type]).catch(error =>
Sentry.Native.captureException(error)
)
Haptics.impactAsync(Haptics.ImpactFeedbackStyle[type]).catch(error => {
// Sentry.Native.captureException(error)
})
}
}

View File

@ -103,7 +103,7 @@ const toastConfig = {
success: (config: Config) => <ToastBase config={config} />,
warning: (config: Config) => <ToastBase config={config} />,
error: (config: Config) => {
Sentry.Native.captureException([config.text1, config.text2])
// Sentry.Native.captureException([config.text1, config.text2])
return <ToastBase config={config} />
}
}