From 509af7abb70087897acaa747c87110097e0ec296 Mon Sep 17 00:00:00 2001 From: Leah Amelia Chen Date: Wed, 24 Jan 2024 21:38:09 +0100 Subject: [PATCH] fix: correct error type in WmctrlExecutor::executable? Fixes #13 --- lib/fusuma/plugin/executors/wmctrl_executor.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/fusuma/plugin/executors/wmctrl_executor.rb b/lib/fusuma/plugin/executors/wmctrl_executor.rb index da43d13..2791e45 100644 --- a/lib/fusuma/plugin/executors/wmctrl_executor.rb +++ b/lib/fusuma/plugin/executors/wmctrl_executor.rb @@ -8,6 +8,8 @@ module Plugin module Executors # Control Window or Workspaces by executing wctrl class WmctrlExecutor < Executor + class InvalidOption < StandardError; end + # executor properties on config.yml # @return [Array] def execute_keys @@ -55,7 +57,7 @@ def executable?(event) # @return [NilClass] def search_command(event) search_workspace_command(event) || search_window_command(event) - rescue Workspace::InvalidOption => e + rescue InvalidOption => e MultiLogger.error(e.message) exit 1 end