mirror of
https://github.com/storytold/cadcraft.git
synced 2026-10-29 13:26:49 -06:00
Session::execute and interactive input already ran under catch_unwind; the machine factory, begin (the first step of Session::start), prompt and preview (called by the UI every frame) did not, so a panic there took down the app. Session::start now wraps each machine in guard::Guarded, which runs all of its steps under catch_unwind. A panic in the factory, begin or input ends the command with an internal error and the session restores the drawing, as for input. prompt and preview can't end the command, so they fall back to an "Internal error" prompt and no preview, and the next input ends the command the same way. AGENTS.md/CLAUDE.md name the wider guard. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>