Browse Source

Log stack traces

Vishnu Mohandas 4 years ago
parent
commit
a9b98e5cc3
2 changed files with 5 additions and 3 deletions
  1. 3 1
      lib/ui/password_entry_page.dart
  2. 2 2
      lib/ui/settings_page.dart

+ 3 - 1
lib/ui/password_entry_page.dart

@@ -36,6 +36,7 @@ class PasswordEntryPage extends StatefulWidget {
 class _PasswordEntryPageState extends State<PasswordEntryPage> {
 class _PasswordEntryPageState extends State<PasswordEntryPage> {
   static const kPasswordStrengthThreshold = 0.4;
   static const kPasswordStrengthThreshold = 0.4;
 
 
+  final _logger = Logger("PasswordEntry");
   final _passwordController1 = TextEditingController(),
   final _passwordController1 = TextEditingController(),
       _passwordController2 = TextEditingController();
       _passwordController2 = TextEditingController();
   double _passwordStrength = 0;
   double _passwordStrength = 0;
@@ -218,7 +219,8 @@ class _PasswordEntryPageState extends State<PasswordEntryPage> {
           Navigator.of(context).popUntil((route) => route.isFirst);
           Navigator.of(context).popUntil((route) => route.isFirst);
         }
         }
       }
       }
-    } catch (e) {
+    } catch (e, s) {
+      _logger.severe(e, s);
       await dialog.hide();
       await dialog.hide();
       showGenericErrorDialog(context);
       showGenericErrorDialog(context);
     }
     }

+ 2 - 2
lib/ui/settings_page.dart

@@ -286,8 +286,8 @@ class _SecuritySectionWidgetState extends State<SecuritySectionWidget> {
               try {
               try {
                 recoveryKey = await _getOrCreateRecoveryKey();
                 recoveryKey = await _getOrCreateRecoveryKey();
                 await dialog.hide();
                 await dialog.hide();
-              } catch (e) {
-                Logger("SecuritySection").severe(e);
+              } catch (e, s) {
+                Logger("SecuritySection").severe(e, s);
                 await dialog.hide();
                 await dialog.hide();
                 showGenericErrorDialog(context);
                 showGenericErrorDialog(context);
                 return;
                 return;