From c5246c9dc8e3aab2aadfba4065e61c213858266b Mon Sep 17 00:00:00 2001 From: Nova Date: Thu, 11 Sep 2025 16:02:39 -0700 Subject: [PATCH] refactor(wayland/surface): better error formatting --- src/wayland/core/surface.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/wayland/core/surface.rs b/src/wayland/core/surface.rs index 17b5ac1..d013f34 100644 --- a/src/wayland/core/surface.rs +++ b/src/wayland/core/surface.rs @@ -142,9 +142,10 @@ impl Surface { "Surface has an incomparible role".to_string(), ) .await?; - Err(server::Error::Custom( - "Surface has an incompatible role".to_string(), - )) + Err(server::Error::Custom(format!( + "Surface {} has role {current_role:?} but tried to set to {role:?}", + self.id + ))) } } None => {