Files
pdfcraft/apps
Brandon ThomasandClaude Opus 5.5 7f09486004 Never crash: last-resort guard around edits, opens, saves and UI commands
`printcraft_engine::guard` wraps `catch_unwind` and returns an error message.
- `Session::apply`: edits run on a copy of the document, so a panic leaves it unchanged and is
  reported as an error. A panic while refreshing rolls the edit back.
- `Session::open`, `save_bytes`, `save_full_bytes` and `export_data` report a panic as an
  open, write or export error.
- `PrintCraftApp::execute`: a command that panics shows a notice, and the app and its documents
  keep running.
- The desktop app installs a panic hook that logs every panic to stderr, with a backtrace when
  `RUST_BACKTRACE` is set.

Autosave and crash recovery (`RecoveryStore`) were already in place for anything that escapes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-04 13:06:24 -04:00
..