Catch errors during initialization

This commit is contained in:
Vishnu Mohandas 2021-02-09 13:44:39 +05:30
parent 08558091ab
commit 1c6b3d8af7

View file

@ -24,10 +24,7 @@ void main() async {
await _runWithLogs(_main);
}
void _main() async {
await _init();
_sync();
void _main() {
final SentryClient sentry = new SentryClient(dsn: SENTRY_DSN);
FlutterError.onError = (FlutterErrorDetails details) async {
@ -36,7 +33,9 @@ void _main() async {
};
runZoned(
() {
() async {
await _init();
_sync();
runApp(MyApp());
BackgroundFetch.registerHeadlessTask(backgroundFetchHeadlessTask);
},