From 7ff4f0727ef05b63be4b91290d0d4b8f3f3854b4 Mon Sep 17 00:00:00 2001 From: MaxVerevkin Date: Sun, 13 Oct 2024 10:44:31 +0300 Subject: fix error handling in wm_info_provider --- src/wm_info_provider/hyprland.rs | 2 +- src/wm_info_provider/river.rs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'src/wm_info_provider') diff --git a/src/wm_info_provider/hyprland.rs b/src/wm_info_provider/hyprland.rs index 0d7d4ec..19a259a 100644 --- a/src/wm_info_provider/hyprland.rs +++ b/src/wm_info_provider/hyprland.rs @@ -39,7 +39,7 @@ impl WmInfoProvider for HyprlandInfoProvider { match hyprland_cb(ctx.conn, ctx.state) { Ok(()) => Ok(event_loop::Action::Keep), Err(e) => { - ctx.state.set_error(ctx.conn, e); + ctx.state.set_error(ctx.conn, "hyprland", e); Ok(event_loop::Action::Unregister) } } diff --git a/src/wm_info_provider/river.rs b/src/wm_info_provider/river.rs index 6b3c8b0..61b7e2b 100644 --- a/src/wm_info_provider/river.rs +++ b/src/wm_info_provider/river.rs @@ -211,6 +211,7 @@ fn seat_status_cb(ctx: EventCtx) { fn river_command_cb(ctx: EventCtx) { if let zriver_command_callback_v1::Event::Failure(msg) = ctx.event { - ctx.state.set_error(ctx.conn, msg.to_string_lossy()) + ctx.state + .set_error(ctx.conn, "river", msg.to_string_lossy()) } } -- cgit v1.3.1