add try catch to Sentry init call

This commit is contained in:
Kyle Fang
2020-05-15 18:19:56 +08:00
parent 9ec9f95f18
commit a44202ea9d

View File

@@ -7,13 +7,17 @@ import "@react-native-firebase/app";
import * as Sentry from "@sentry/react-native";
import { env, sentry } from "./src/app.json";
Sentry.init({
dsn: sentry,
environment: env,
enabled: !__DEV__,
debug: __DEV__,
});
enableScreens();
try {
Sentry.init({
dsn: sentry,
environment: env,
enabled: !__DEV__,
debug: __DEV__,
});
} catch (e) {
console.error(e);
}
AppRegistry.registerComponent("booster", () => App);