From 6f73fc7c7745db317ff5c36b432dc13fbdf2350f Mon Sep 17 00:00:00 2001 From: smittie2000 Date: Wed, 4 Nov 2026 06:50:35 +0200 Subject: [PATCH] start_failure: say the window could not start or stopped, and offer the driver as a likely fix The dialog is shown for any error run_native returns, including one after the window was up, so "could not start its window" and "updating the graphics driver usually fixes this" overstated what is known. From review. Co-Authored-By: Claude Opus 5.5 --- apps/materialcraft/src/start_failure.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/materialcraft/src/start_failure.rs b/apps/materialcraft/src/start_failure.rs index 836ae6ba..5552e0f0 100644 --- a/apps/materialcraft/src/start_failure.rs +++ b/apps/materialcraft/src/start_failure.rs @@ -10,9 +10,10 @@ //! Now the reason also goes to an error dialog, as FilmCraft does since 0.14.0. The dialog keeps //! the process alive until it is dismissed; the exit code afterwards is still the error's. -/// What the dialog and the log say. +/// What the dialog and the log say. Any error `run_native` returns lands here, also one after the +/// window was up, so graphics is only the likely cause, not the certain one. pub(crate) fn message(error: &eframe::Error) -> String { - format!("MaterialCraft could not start its window: {error}\n\nUpdating the graphics driver usually fixes this.") + format!("MaterialCraft's window could not start or stopped with an error: {error}\n\nIf this keeps happening, updating the graphics driver often fixes it.") } /// Logs the failure and shows it in a dialog, which stays until the user closes it. @@ -29,7 +30,7 @@ mod tests { #[test] fn the_message_names_the_cause_and_what_to_do() { let text = message(&eframe::Error::AppCreation("no adapter".into())); - assert!(text.starts_with("MaterialCraft could not start its window"), "{text}"); + assert!(text.starts_with("MaterialCraft's window could not start or stopped"), "{text}"); assert!(text.contains("no adapter"), "{text}"); assert!(text.contains("graphics driver"), "{text}"); }