This commit is contained in:
Developer
2026-06-05 02:31:55 +08:00
parent a5d8483797
commit c014ad7dec
2 changed files with 23 additions and 3 deletions

View File

@@ -1,9 +1,9 @@
// ============================================================
// 闲言APP — 应用入口
// 创建时间: 2026-04-20
// 更新时间: 2026-05-30
// 更新时间: 2026-06-05
// 作用: main 函数,初始化存储 + 液态玻璃 + 异常捕获 + 启动 App
// 上次更新: 替换bitsdojo_window为window_manager桌面端窗口初始化
// 上次更新: _appMain()调用增加catchError捕获未处理异常防止初始化失败崩溃
// ============================================================
import 'dart:async';
@@ -50,7 +50,9 @@ void main() async {
// 移除外层 runZonedGuarded由 Catcher2 内部管理 zone
// 异常捕获由 Catcher2 + GlobalErrorHandler 共同处理
_appMain();
_appMain().catchError((Object e, StackTrace st) {
Log.e('main初始化失败', e, st);
});
}
/// 应用主入口逻辑