浏览代码

chore(mobile): add more catch all error log detail (#3893)

Alex 1 年之前
父节点
当前提交
0a89c7ffc4
共有 1 个文件被更改,包括 6 次插入2 次删除
  1. 6 2
      mobile/lib/main.dart

+ 6 - 2
mobile/lib/main.dart

@@ -63,11 +63,15 @@ Future<void> initApp() async {
 
   FlutterError.onError = (details) {
     FlutterError.presentError(details);
-    log.severe(details.toString(), details, details.stack);
+    log.severe(
+      'Catch all error: ${details.toString()} - ${details.exception} - ${details.library} - ${details.context} - ${details.stack}',
+      details,
+      details.stack,
+    );
   };
 
   PlatformDispatcher.instance.onError = (error, stack) {
-    log.severe(error.toString(), error, stack);
+    log.severe('Catch all error: ${error.toString()} - $error', error, stack);
     return true;
   };
 }