From d6f77379d9195dd43d9319c025e964f58d245406 Mon Sep 17 00:00:00 2001 From: JavaZeroo <71128095+JavaZeroo@users.noreply.github.com> Date: Sat, 31 Oct 2026 17:38:45 +0800 Subject: [PATCH] diag(shell): name the workspace scenario when it fails refs #73 Workspace scenarios failed with only the caller text, so the window procedure now prints the scenario mode and the error before tearing down. --- experiments/shell/workspace.hpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/experiments/shell/workspace.hpp b/experiments/shell/workspace.hpp index 4ae1310d..c5c439b2 100644 --- a/experiments/shell/workspace.hpp +++ b/experiments/shell/workspace.hpp @@ -643,7 +643,13 @@ class Workspace { try { self->paint(dc); } catch(...) { EndPaint(hwnd,&ps); throw; } EndPaint(hwnd,&ps); return 0; } - } catch(const std::exception& error) { self->failure_=error.what(); self->discard_and_close(); } + } catch(const std::exception& error) { + self->failure_=error.what(); + // Workspace scenarios (selection, actions, shells) fail outside the + // per-tab dump, so report the scenario identity and the message here. + std::cerr << "workspace-failure mode=" << self->test_mode_ << " what=" << self->failure_ << '\n'; + self->discard_and_close(); + } return DefWindowProcW(hwnd,message,wp,lp); } public: