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

@@ -4,6 +4,24 @@
***
## [v6.16.8] - 2026-06-05
### 🛡️ main()初始化异常捕获修复
#### 问题
- **`_appMain()`未捕获异常** — `_appMain()`是返回`Future<void>`的异步函数,在`main()`中直接调用未await也未捕获异常。若初始化过程中发生未处理的异步异常如windowManager初始化失败、Catcher2配置异常等会导致顶层未处理的Future异常整个应用崩溃且无日志记录。
#### 修复
- **catchError兜底** — 在`main()`中为`_appMain()`调用添加`.catchError()`,捕获所有未处理的异步异常并记录日志,防止静默崩溃
#### 举一反三
- 所有异步入口函数调用必须处理Future异常catchError或try-catch
- 即使内部各步骤已有try-catch顶层仍需兜底保护防止遗漏
**修改文件:** `lib/main.dart`
***
## [v6.16.7] - 2026-06-05
### 🌐 Web端编译+运行修复 — Platform兼容+Zone mismatch+path_provider保护