Commit 3a5e0e3
baiqing
docs(startup): clarify catch rationale + improve warn diagnostics
Both local review and PR-Agent bot flagged the "fallback when settings
read fails" semantic reversal. Re-analysis confirms the change is
correct, but the rationale needs to be explicit in the code:
- Rust `get_settings` signature is `pub fn -> UserPreferences` (not
Result), so this catch is unreachable from a normal first-launch
scenario (returns defaults). Only Tauri IPC infrastructure failures
(e.g. __TAURI_INTERNALS__ not ready during autostart early-mount)
reach this branch.
- Tray is registered by Rust setup() before webview ready, so it remains
the universal fallback entry point — no "user locked out" risk.
- Improved console.warn to include err.message for diagnostics, since
raw err objects serialize as [object Object] in Tauri devtools.
No behavior change; comment + log improvement only.
Refs review of #4881 parent 16c66d9 commit 3a5e0e3
1 file changed
Lines changed: 12 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
61 | 68 | | |
62 | 69 | | |
63 | 70 | | |
| |||
0 commit comments