Skip to content
Snippets Groups Projects
Commit 0fd05e4b authored by vjrj's avatar vjrj
Browse files

Send exceptions to sentry

parent 8af14c28
No related branches found
No related tags found
No related merge requests found
...@@ -6,6 +6,7 @@ import 'package:flutter/foundation.dart'; ...@@ -6,6 +6,7 @@ import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:pattern_lock/pattern_lock.dart'; import 'package:pattern_lock/pattern_lock.dart';
import 'package:sentry_flutter/sentry_flutter.dart';
import 'package:universal_html/html.dart' as html; import 'package:universal_html/html.dart' as html;
import '../../../data/models/transaction_cubit.dart'; import '../../../data/models/transaction_cubit.dart';
...@@ -92,13 +93,15 @@ class _ImportDialogState extends State<ImportDialog> { ...@@ -92,13 +93,15 @@ class _ImportDialogState extends State<ImportDialog> {
return; return;
} }
Navigator.of(context).pop(true); Navigator.of(context).pop(true);
} catch (e) { } catch (e, stacktrace) {
context.replaceSnackbar( context.replaceSnackbar(
content: Text( content: Text(
tr('wrong_pattern'), tr('wrong_pattern'),
style: const TextStyle(color: Colors.red), style: const TextStyle(color: Colors.red),
), ),
); );
await Sentry.captureException(e,
stackTrace: stacktrace);
} }
}, },
), ),
...@@ -141,8 +144,9 @@ class _ImportDialogState extends State<ImportDialog> { ...@@ -141,8 +144,9 @@ class _ImportDialogState extends State<ImportDialog> {
logger(jsonString); logger(jsonString);
} }
completer.complete(jsonString); completer.complete(jsonString);
} catch (e) { } catch (e, stacktrace) {
logger('Error importing wallet $e'); logger('Error importing wallet $e');
await Sentry.captureException(e, stackTrace: stacktrace);
} }
}); });
return completer.future; return completer.future;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment