Silent catch blocks and debug-only logging in the paste and recovery paths #105

Open
opened 2026-10-13 02:28:58 +00:00 by ImBenji · 0 comments
Owner

From the engineering review on 2026-10-13.

The project rule is that every caught error still prints. These do not:

  • Five catch (_) blocks in the paste path, lib/provider/map_data_state.dart around lines 3270, 3318, 3412, 3428 and 3450.
  • lib/utils/recovery_store.dart around lines 125, 296, 305 and 318 use catch (_) with no log. Around line 47 it deletes the whole prefs box (recents, macOS bookmarks, keymap) on any open failure, with a debug-only log.
  • _log in session_recovery_store.dart, recovery_blob_store_io.dart and recovery_blob_store_web.dart is gated on kDebugMode, so release builds lose the message. That is why a skipped autosave draft is invisible.
  • lib/main.dart around lines 97 and 170 swallow recovery init and promote failures through a debug-only probe, so a session can run with no autosave and nobody is told.

Status: from the reviewers' reading; line numbers not re-checked independently.

Fix sketch: log in every one of these with the stack, and make the recovery logs unconditional.

From the engineering review on 2026-10-13. The project rule is that every caught error still prints. These do not: - Five `catch (_)` blocks in the paste path, `lib/provider/map_data_state.dart` around lines 3270, 3318, 3412, 3428 and 3450. - `lib/utils/recovery_store.dart` around lines 125, 296, 305 and 318 use `catch (_)` with no log. Around line 47 it deletes the whole prefs box (recents, macOS bookmarks, keymap) on any open failure, with a debug-only log. - `_log` in `session_recovery_store.dart`, `recovery_blob_store_io.dart` and `recovery_blob_store_web.dart` is gated on `kDebugMode`, so release builds lose the message. That is why a skipped autosave draft is invisible. - `lib/main.dart` around lines 97 and 170 swallow recovery init and promote failures through a debug-only probe, so a session can run with no autosave and nobody is told. **Status:** from the reviewers' reading; line numbers not re-checked independently. **Fix sketch:** log in every one of these with the stack, and make the recovery logs unconditional.
ImBenji added the bug label 2026-10-13 02:28:58 +00:00
ImBenji added this to the Arcs & Angles project 2026-10-13 02:28:58 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: IMBENJI.NET/Metro-Map-Maker#105